kmehant opened issue #5867:
<!-- Thanks for the bug report! -->
Description
wasmtime run --tcplisten localhost:8080 --wasm-features=all wasm_with_network_code.wasm localhost 8080
output:
operation not implemented
wasmtime run --wasm-features=all wasm_with_network_code.wasm localhost 8080
output:
operation not implemented
Steps to reproduce
Build Go program with the below code with wasi target
// os.Args[1] -> localhost // os.Args[2] -> 8080 server, err := net.Listen("tcp", os.Args[1]+":"+os.Args[2])
run the wasm module with wasmtime
wasmtime run --wasm-features=all wasm_with_network_code.wasm localhost 8080
or
wasmtime run --tcplisten localhost:8080 --wasm-features=all wasm_with_network_code.wasm localhost 8080
Expected behavior
start a server and listen at localhost:8080 and accept requests
Actual behavior
fails with message operation not implemented
Versions and Environment
Wasmtime version or commit: wasmtime-cli 5.0.0
Operating system: Mac OS Monterey
Architecture: AMD 64
kmehant labeled issue #5867:
<!-- Thanks for the bug report! -->
Description
wasmtime run --tcplisten localhost:8080 --wasm-features=all wasm_with_network_code.wasm localhost 8080
output:
operation not implemented
wasmtime run --wasm-features=all wasm_with_network_code.wasm localhost 8080
output:
operation not implemented
Steps to reproduce
Build Go program with the below code with wasi target
// os.Args[1] -> localhost // os.Args[2] -> 8080 server, err := net.Listen("tcp", os.Args[1]+":"+os.Args[2])
run the wasm module with wasmtime
wasmtime run --wasm-features=all wasm_with_network_code.wasm localhost 8080
or
wasmtime run --tcplisten localhost:8080 --wasm-features=all wasm_with_network_code.wasm localhost 8080
Expected behavior
start a server and listen at localhost:8080 and accept requests
Actual behavior
fails with message operation not implemented
Versions and Environment
Wasmtime version or commit: wasmtime-cli 5.0.0
Operating system: Mac OS Monterey
Architecture: AMD 64
pchickey commented on issue #5867:
Can you provide a wasm binary we can use to reproduce?
kmehant commented on issue #5867:
@pchickey Here it is. Thanks
bjorn3 commented on issue #5867:
How was the binary compiled? From what I can gather go doesn't yet support wasi. Are you using tinygo? I think tinygo doesn't support network functionality yet and throws that exact "operation not implemented" error: https://github.com/tinygo-org/tinygo/blob/0d56dee00f49bd50eb373c02c30062a75ec28f10/src/net/dial.go#L20
kmehant commented on issue #5867:
How was the binary compiled? From what I can gather go doesn't yet support wasi. Are you using tinygo? I think tinygo doesn't support network functionality yet and throws that exact "operation not implemented" error: https://github.com/tinygo-org/tinygo/blob/0d56dee00f49bd50eb373c02c30062a75ec28f10/src/net/dial.go#L20
@bjorn3 Ah, got it, thanks.
Are there any alternatives?
bjorn3 commented on issue #5867:
You could ask tinygo to add support for it. Alternatively you could try directly binding to wasi's sock_accept, but I'm not sure if tinygo allows that or puts it's own standard library in a privileged position.
pchickey commented on issue #5867:
I'll close this because it appears to be a tinygo issue
pchickey closed issue #5867:
<!-- Thanks for the bug report! -->
Description
wasmtime run --tcplisten localhost:8080 --wasm-features=all wasm_with_network_code.wasm localhost 8080
output:
operation not implemented
wasmtime run --wasm-features=all wasm_with_network_code.wasm localhost 8080
output:
operation not implemented
Steps to reproduce
Build Go program with the below code with wasi target
// os.Args[1] -> localhost // os.Args[2] -> 8080 server, err := net.Listen("tcp", os.Args[1]+":"+os.Args[2])
run the wasm module with wasmtime
wasmtime run --wasm-features=all wasm_with_network_code.wasm localhost 8080
or
wasmtime run --tcplisten localhost:8080 --wasm-features=all wasm_with_network_code.wasm localhost 8080
Expected behavior
start a server and listen at localhost:8080 and accept requests
Actual behavior
fails with message operation not implemented
Versions and Environment
Wasmtime version or commit: wasmtime-cli 5.0.0
Operating system: Mac OS Monterey
Architecture: AMD 64
Last updated: Dec 23 2024 at 12:05 UTC