
Show HN: WebAssembly System Interface for Deno has been merged into Deno - caspervonb
https://deno.land/std/wasi/README.md
======
caspervonb
So this is somewhat of a followup to
[https://news.ycombinator.com/item?id=23548491](https://news.ycombinator.com/item?id=23548491)
which was about deno-wasi, an implementation of the WebAssembly System
Interface for Deno.

Well, I merged deno-wasi into deno about week or two ago, currently shipping
in stable.

Please feel free to break it :)

------
neals
Not familliar with WebAssembly. Does this mean Deno is talking to code written
in other languages that are compiled to WebAssemlby?

~~~
flohofwoe
In a Javascript ecosystem, WebAssembly and WASI can play a similar role as
native DLLs in Python (or also the role native DLLs are playing in the NPM
ecosystem). You can load WASM modules from Javascript code, and those WASM
modules can interact with the underlying system via WASI.

This enables some new scenarios:

\- You want to use an existing library, but this library isn't available in
Javascript. Instead of porting the library source code over to JS, compile it
to WASM and call into the WASM module from Javascript.

\- You've optimized some piece of JS code, but hit a performance or
readability wall (often, JS code optimized for performance is much less
readable than "idiomatic" JS). You can port the code to C and compile to WASM
instead, this might push the wall a little bit further (not as far away as
native code would allow, but often quite close).

The main advantage of WASM+WASI over native DLLs is that they are OS and CPU
independent. You don't need a DLL built for each possible OS+CPU combination,
instead just compile once to a WASM module.

