You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling to wasm32-wasi, libc does not include some emulated wasi-libc functions like mmap. When using wasi-libc directly, you can set some extra parameters to enable these emulated functions like:
-D_WASI_EMULATED_MMAN # for clang
-lwasi-emulated-mman # for lld
What would be the appropriate fix for this? I was hoping a cargo feature or something similar could solve the problem. I am a bit new here, so if I could get some guidance I would be happy to PR to supply these additions. (I see that changes would be needed for https://github.com/rust-lang/libc/blob/master/src/wasi.rs, but I am not sure what would need to change in build.rs or elsewhere to accommodate this.)
The text was updated successfully, but these errors were encountered:
I think I got a bit confused; I thought this libc was bundling the target libc implementation itself but it looks as though it isn't. It just handles the ffi bindings (please do correct me if I am wrong).
I'll make a PR with a cargo feature for wasi-emulated-mman (or something else if someone has a better suggestion) with the associated bindings, so that people building with their own wasi-libc sysroot can turn on the cargo feature and use mman.h.
When compiling to
wasm32-wasi
,libc
does not include some emulatedwasi-libc
functions likemmap
. When usingwasi-libc
directly, you can set some extra parameters to enable these emulated functions like:What would be the appropriate fix for this? I was hoping a cargo feature or something similar could solve the problem. I am a bit new here, so if I could get some guidance I would be happy to PR to supply these additions. (I see that changes would be needed for https://github.com/rust-lang/libc/blob/master/src/wasi.rs, but I am not sure what would need to change in build.rs or elsewhere to accommodate this.)
The text was updated successfully, but these errors were encountered: