Skip to content

Add emulated features from wasi-libc (like mmap) #3091

Description

@GregoryConrad

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.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions