DEV Community


Discussion on: Explain the State of WebAssembly to Me

jrop profile image
Jonathan Apodaca

WebAssembly is an open-standard, stack-based VM that includes: a bytecode format, an S-expressions text-based format, among other things. One can implement a VM in whatever language they chose, and be running WASM modules in that language. It's one of the most portable executable bundle formats due to its adoption. Despite its name, it is not limited to running only on the web (Google "Mozilla WASI", for example).

This means that one can write code in whatever source-language, bundle it into a WASM module, and begin executing it in various environments.

It does have limitations: the largest one, for example, is that the spec does not include a garbage collector, so the best source-languages for WASM (right now) are Rust/C++.

I look forward to (soon) being able to write Rust that can be imported into NodeJS, Python, etc. What is not clear to me, however, is how to expose APIs that my WASM module will need to the underlying code, without manually injecting it.

Forem Open with the Forem app