Stream: general

Topic: Can someone help me with using wrpc-wasmtime?


view this post on Zulip Filip B. Gotten (Feb 06 2025 at 20:02):

Following the guide on the readme, with the first steps being to build the rust based hello component server and client wasm components, does work for me. I copied the files directly from the examples and changed nothing. I have the folders hello-component-serveri, hello-component-client and wit, with all files inside.

Then when trying to use wrpc-wasmtime to run it with: "wrpc-wasmtime tcp serve ./target/wasm32-wasip2/release/hello_component_server.wasm"

I get this output:

'INFO wrpc_wasmtime_cli: serving instance function name="hello"'

However, when trying to run the client with: wrpc-wasmtime tcp run ./target/wasm32-wasip2/release/hello-component-client.wasm

I get this output:

Error: failed to run component

Caused by:
0: error while executing at wasm backtrace:
0: 0x13bf9 - wit-component:adapter:wasi_snapshot_preview1!wasi_snapshot_preview1::descriptors::Descriptors::new::h23d25887e02c514f
1: 0x13110 - wit-component:adapter:wasi_snapshot_preview1!wasi_snapshot_preview1::State::descriptors::hfc2c9cda66bef96d
2: 0x136af - wit-component:adapter:wasi_snapshot_preview1!fd_write
3: 0x15379 - wit-component:shim!adapt-wasi_snapshot_preview1-fd_write
4: 0x62c7 - hello_component_client-603742b98b7403cb.wasm!wasi::lib_generated::fd_write::h8df31592ef2e843e
5: 0x16b8 - hello_component_client-603742b98b7403cb.wasm!<std::io::stdio::StdoutLock as std::io::Write>::write_all::hca818e235ef94a2b
6: 0x4a17 - hello_component_client-603742b98b7403cb.wasm!<std::io::Write::write_fmt::Adapter as core::fmt::Write>::write_str::h14ef88f914a08876
7: 0xaed4 - hello_component_client-603742b98b7403cb.wasm!core::fmt::write::h18af0510448cac73
8: 0x3e59 - hello_component_client-603742b98b7403cb.wasm!<&std::io::stdio::Stdout as std::io::Write>::write_fmt::h2a1573965672f010
9: 0x440e - hello_component_client-603742b98b7403cb.wasm!std::io::stdio::_print::h4babcc457f93ab74
10: 0xcf2 - hello_component_client-603742b98b7403cb.wasm!hello_component_client::main::h3308f92b4b4b600e
11: 0xc30 - hello_component_client-603742b98b7403cb.wasm!std::sys::backtrace::__rust_begin_short_backtrace::ha334adbbdca9bb9e
12: 0xc23 - hello_component_client-603742b98b7403cb.wasm!std::rt::lang_start::{{closure}}::he3426677d12a8a24
13: 0x2ab3 - hello_component_client-603742b98b7403cb.wasm!std::rt::lang_start_internal::hd70631645e5839e9
14: 0xd62 - hello_component_client-603742b98b7403cb.wasm!__main_void
15: 0xbfc - hello_component_client-603742b98b7403cb.wasm!_start
16: 0x128d2 - wit-component:adapter:wasi_snapshot_preview1!wasi:cli/run@0.2.3#run
1: failed to decode return value 0
2: unexpected end of file

Afterwards this is printed to the server window:

ERROR wrpc_wasmtime_cli::tcp: failed to accept TCP connection err=wasi:cli/stdin@0.2.3#get-stdin does not have a handler registered

Could anyone help me figure out what is wrong here?


Last updated: Feb 28 2025 at 02:27 UTC