emscripten-core / emscripten-core/emscripten

A question about how EMCC implements WASI

Open
#12,341 6 comments 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Hi,

There is a question about how emcc implements WASI. I think that under normal circumstances, it should invoke the WASI APIs’ implementation and import the corresponding wasi function in the target wasm file like wasi-sdk, but after testing case using system API like file system api fopen, I found that it is different with EMCC. I notice that someone has submitted similar test case here [#12094](https://github.com/emscripten-core/emscripten/issues/12094) so I do not attach mine.

In the meanwhile, I also notice that there are tutorials about using files in [emscripten.org](https://emscripten.org/docs/getting_started/Tutorial.html#using-files ) , so does it mean that emcc's implementation about WASI relys on browser or nodejs Api, which is different from the traditional wasi-sdk by invoking wasi api? Is there any possible way to compile wasm module of standard wasi with emcc?

Looking forward to your reply.

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.