After I have inherited the network in my WasiCtx for my component is it possible to use std::net::TCP::connect in my wasm program or do I need a specialized one?
For the time being, you'll need to use my Rust and wasi-sdk forks. There are instructions for building them at https://github.com/dicej/wasi-sockets-tests. We're working on getting support upstreamed, but it will be a long process.
Awesome thank you for the info! I will take a look at this
Alternatively, you can use the wit-bindgen
-generated bindings directly if you don't need compatibility with the std
types.
Would I have to add wasi_sockets to my deps for wit bindgen by any chance? Sorry about the multiple questions very new to using wit
You'd need to target a world that imports the wasi:sockets/tcp
and wasi:sockets/network
interfaces. The wasi:cli/imports
world does, for example.
Awesome thank you I will try this!
Cwasi4wasm has marked this topic as resolved.
Last updated: Nov 22 2024 at 16:03 UTC