denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.07k stars 5.4k forks source link

Implement `node:wasi` #21025

Open littledivy opened 1 year ago

littledivy commented 1 year ago

std/wasi is being deprecated https://github.com/denoland/deno_std/pull/3732 and it would be nice to offer an alternative i.e node:wasi before it's removal.

Some ideas on perfomance:

rracariu commented 1 year ago

Interesting, would this go further and add implementation for WASI preview2? How about supporting wasm32-wasi-threads?

terrablue commented 9 months ago

Are there any plans to implement this? I'm using ruby.wasm in my software, which relies on node:wasi, which means that users who wish to write ruby backend code can't use deno.

mdekstrand commented 3 months ago

I would love to see WASI support for Deno.

In the mean time, perhaps it should be removed from the docs until this is implemented? I expected it would work from seeing it in the docs, and was surprised that the module cannot even be imported.

glebbash commented 1 month ago

Existing "alternatives":


It would be very nice to have a cross-platform (Node.js/Deno/browsers) WASI runtime.

Here is a WASI preview1 shim (for Node & Deno) I wrote that can be used as an inspiration for anyone interested in writing a full lib.

terrablue commented 1 month ago

@glebbash cool, these all sound interesting.

My issue is that I rely on the ruby.wasm project to run Ruby on the server, and that relies on node:wasi. I doubt it would be easy to convince the author of ruby.wasm to use another library.