Stream: git-wasmtime

Topic: wasmtime / issue #2732 Does wasmtime support socket?


view this post on Zulip Wasmtime GitHub notifications bot (May 05 2022 at 16:36):

alexcrichton commented on issue #2732:

I'm going to close this in favor of upstream WASI proposals to add sockets. Of note is that sock_accept was recently added to wasi-snapshot-preview1 which Wasmtime supports now as well.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2022 at 16:36):

alexcrichton closed issue #2732:

I have a socket cpp application, i want to port it to wasm, so i did:
wasm32-wasi-clang++ server_c1.cpp -o server_c1Wasi.wasm
but it says

server_c1.cpp:28:21: error: use of undeclared identifier 'socket'
int serv_sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

I wonder if there is any workaround? Thank you!


Last updated: Oct 23 2024 at 20:03 UTC