Rust streams: Diving into WebAssembly and WASI (series)

Rust streams: Diving into WebAssembly and WASI (series)

#wasm #wasi #programming WebAssembly - What is it? binary instruction set for a stack based virtual machine a stack based virtual machine - you have a stack and instructions that operate on the stack WebAssembly in the browser: You need HTML to load a JavaScript program JavaScript in turns loads a *wasm* module and the browser will only fetch *wasm* modules over HTTPs and will not load local stored *wasm* files - so you’ll need a HTTP server Outside the browser: you need a runtime or a host there’s been an explosion in available runtimes (wasmtime, wasmedge, warmer, wasm3 etc.) WASI or WebAssembly System Interface: WASM code runs in a sand-boxed environment i.e. *wasm* code is only allowed to operate or interact with a given piece of memory (stack allocation). This means we are limited to pure functions. In other words, you don’t have access to external resources (operating system resources) such as files, sockets, cpus etc. that’s where WASI comes in - it is a collection or set of standardized of system calls (much like POSIX) for WASM. All WASI compliant runtimes are required to implement the standardized system interface. Time codes 00:00:00 Intro 00:06:40 Impl - stack-based VM 00:31:06 wasm instruction set 00:32:19 wasm in and outside the browser 00:32:49 brief note on WASM for IoT Edge 00:38:45 webassembly system interface 00:45:08 Wrap up