Closed hungryzzz closed 1 month ago
I suspect that what is happening here is that you are hitting a target that has not yet enabled support for wasi-sockets. This is actually more of a wasi-libc issue, since that is where the C definitions of those functions would get plumbed to the appropriate wasi-sockets calls. In fact, there's already an issue open on this where @dicej talks about a plan for a wasi-libc target that would support this: https://github.com/WebAssembly/wasi-libc/issues/447.
I suggest we close this issue and ask for a status update there? If something is still broken, I can move this issue to that repository.
Sure. But I am curious that before the wasi-sockets or wasi-http APIs are implemented, is there any other way to run a C program which sends HTTP requests to other services on Wasm?
I mean, you could always import a function from the host to do that, but I think the standard way is going to be via one of those WASI proposals.
Hi, I write a C program which will send an HTTP request to a server and it can run successfully when compiling it to machine code.
When I try to use
wasi-sdk
to compile it, I encounter the following errors. It seems thatwasi-sdk
cannot find the socket library API. What should I do to compile it successfully? Thank you very much!