Open 5d-jh opened 1 day ago
On the web we cannot actually do DNS so we have a kind of fake implementation here: https://github.com/emscripten-core/emscripten/blob/ef0efd234a728f5b1dc1131e118566cad97bcdf1/src/library.js#L908-L920
We could add a special case for "localhost"
here, and maybe we should do that? Would like have time to send a PR for that perhaps.
However, I'm not sure the program in question would get much futher in that case since we don't have any actually TCP/UDP networking support either. What is your program hoping to do with the 127.0.0.1
address?
Fix is in #22641
However, I'm not sure the program in question would get much futher in that case since we don't have any actually TCP/UDP networking support either. What is your program hoping to do with the 127.0.0.1 address?
I was trying to use librdkafka on Node.js. And for portability wise, I tried to compile it into WebAssembly instead of node-gyp. 127.0.0.1
was needed in the middle of test if librdkafka wasm binary sends data to kafka as expected.
But after heard that TCP/UDP capabilities are not available, compiling it into wasm seems no-go after all. (Proxying is supported but huge disadvantage for performance wise)
Aside from dns resolution, is what I'm understanding correct?
Also tried with -sPURE_WASI
option but it seems very experimental(met bunch of runtime errors).
emscripten does not currently support any kind TCP/UDP sockets on node. However, do we have a feature called NODERAWFS that exposed raw node filesystem stuff. This could be extended I imagine fairly easily to include realy TCP/UDP support under node. Would you be interested in adding such support perhaps?
During building librdkafka, I encountered
Name does not resolve
error. After some research, I found getaddrinfo behaves differencly with native build.When loopback address is given, I expect loopback as is instead of local ip address.
Version of emscripten/emsdk:
Failing command line in full:
outputs
outputs
Full link command and output with
-v
appended: