Adding a new target to rust (wasm32-wasi-lunatic)

Hi everyone,

I'm working on a wasm runtime that exposes some additional features not included in WASI (threads, processes, ...). However, at the same time it's fully compatible with WASI.

I would love for Rust users targeting the runtime, to be able to just add the target with rustup target add wasm32-wasi-lunatic --toolchain=nightly and get the full power of Rust's stdlib.

The runtime is still a work in progress and it will take some time until the api is stable, but I wanted already to start the discussion to see how likely it is for something like this to be included in the compiler?

I would also love some pointers on what the best approach would be to add it. Looking at the WASI implementation it delegates the implementation the the wasi crate, containing the low level wasi syscalls.

I would have a similar approach, creating a low level lunatic-syscalls crate and implementing for example threads on top of it. This would introduce a new dependency. Would this be a resonable approach or should I try to avoid adding a new dependency?

Any pointers would be appreciated, thanks!

1 Like

Sounds to me like it might be best to propose your changes to the wasi repo itself, and maybe they can get added as experimental features in wasm32-wasi.

1 Like