Wasm Intro
Rainer Stropek | @rstropek
Material
These slides
🔗
Client-side sample
🔗
Server-side sample
🔗
What is WebAssembly (Wasm)
Binary instruction format
Open specification
🔗
Stack-based VM
Portable compilation target
Deployable on (web) client and servers
Sandboxed execution environment
Security policies of the browsers are enforced
When embedded in JS runtime, interact with JS
Rust and Wasm
Use cases on the client
Build part of an application
Reuse existing code (e.g. rendering logic)
Implement CPU-intensive, performance-critical parts
Build an entire web application
E.g. yew
🔗
Use cases on the server
Build part of an application (e.g. in combination with Node.js)
Build web apps/APIs
​E.g. WAGI
Â
🔗
, Spin
🔗
Similar to Container technology
What is WASI?
WebAssembly System Interface
Not focusing on web apps, but server apps
Yet, it
can
 run in a web-browser
Standard set of APIs to interact with OS
E.g. file access, networking
Portable, not OS-specific
Wasmtime, Wasmer, Krustlet & Co
Runtimes for WebAssembly and WASI
Wasmtime
🔗
Wasmer
🔗
Wasm in K8s
Krustlet
🔗
Demo
Time!