augmenting Javascript in the browser to run native code in a fast, portable, and secure way for games, 3D graphics, etc. Supported by all major browsers webassembly.org
run outside the browser with the WASI project Instead of running apps as VMs or containers, you can run them as faster, smaller, more secure, and more portable WebAssembly modules
cold-start Smaller ⇒ A HelloWorld Rust app in Wasm is smaller than in an OCI container More secure ⇒ Containers execute in an allow-by-default model whereas Wasm apps execute in a deny-by-default sandbox More portable ⇒ A container built for linux/amd64 won’t work on linux/arm64 whereas a wasm32/wasi module can run on any host with a Wasm runtime
limited ⇒ e.g. no socket support yet Some runtimes implement their own sockets ⇒ e.g. wasmedge has extensions for sockets in Rust, JavaScript, C Some projects try to enhance WASI ⇒ e.g. WAGI adds HTTP handlers around WASI ⇒ e.g. WASIX adds full POSIX but only supported on wasmer runtime No Garbage collection yet but there’s a proposal ⇒ github.com/WebAssembly/gc wasi.dev
in 4.15, Docker uses runwasi to run Wasm with wasmedge, wasmtime, spin, and slight Azure AKS is also previewing Wasm node pools using runwasi with spin and slight on wasmtime WebAssembly and containerd: How it works by Nigel Poulton
Write a command line application that prints a few headers, and compile it to wasm32/wasi Add an entry to the modules.toml matching URL to the Wasm module and that’s it WebAssembly Gateway Interface github.com/deislabs/wagi
Spin by Fermyon seems to be the most comprehensive and relevant for Wasm services Handles the HTTP request/response using WAGI. Spin SDKs are available in Rust, Go and .NET. and all Wasi-compatible languages are supported github.com/fermyon/spin
no Tokio or async) C, C++ Good support (but no C++ exceptions or threads) Go Support via TinyGo (but reflection is not supported) and Go 1.21 RC JavaScript Support via Shopify’s Javy on QuickJS? C#/.NET Support via experimental WASI SDK in .NET 7, wasi-experimental workload in .NET 8 preview Java Support via a fork by Fermyon of TeaVM (Java to Javascript compiler)? Kotlin Support via kowasm and Node experimental WASI API Python Support via CPython on wasm32-wasi Ruby Support via ruby.wasm www.fermyon.com/wasm-languages/webassembly-language-support enarx.dev/docs/WebAssembly/Introduction