After landing of this PR:
std for WASI will be mostly
libc-free. It's relatively easy to remove the remaining uses, but it will hurt interoperability with non-Rust code, so we will have to use a separate target if we want it (e.g.
target_env equal to
rust). Introducing such target will allow us to minimize size of pure-Rust WASI applications by completely removing
libc, also it may be a good test before introducing a hypothetical
libc-free Linux target.
libc functions under question:
__wasilibc_find_relpath: uses a map of preopened fiel descriptors to their path which is kept by
abort: since WASI does not have a proper signal handling can be replaced by
free, etc.: can be replaced by
unsetenv: can be easily implemented in Rust code.