Hi! I have a problem. I built a c++ module with emscreepten. It uses ICU lib (ported to emcc). I have an error on instantiation of a WASI linker like :unknown import: `env::__syscall_stat64` has not been defined
How to link these syscalls properly?
You can't mix emscripten and wasi together. That is like trying to run a linux program on windows. You will either have to compile for wasi using wasi-sdk and run in a runtime supporting wasi like wasmtime, or you have to compile using emscripten and run it in the browser or any wasm runtime implementing the emscripten abi.
are you sure you not missing something? I thought that WASI is something like a concept of importing system API. EMSCREEPTEN and WASI-SDK are just variants of this implementation
I have researched a bit. Now i see. There is a WASI and emscreepten use it a little bit (it explaines why i can run minimal examples)
Thank you for the help
Emscripten does use some of the wasi interfaces internally, but it also uses a lot of emscripten specific interfaces and doesn't implement many wasi interfaces.
One way to put it is that wasi and emscripten are kind of like linux and freebsd. There is overlap in terms of the api, but if you compile for one OS, it likely won't run correctly on another OS even if a small subset of the programs may actually happen to work correctly if both OSes are from the same OS family.
Last updated: Nov 22 2024 at 17:03 UTC