Modern Sandboxing: Using Web Assembly in Java
summary
Claim: run untrusted code inside a Java process by embedding WebAssembly with Extism to move computation to the data while keeping it deny-by-default sandboxed. Demonstrates a Rust->WASM plugin called via an Extism manifest, host functions to expose only needed ops, and a 10,000 fuel limit to stop infinite loops. Notes runtimes (Wasmtime, WasmCloud, Spin), overhead from copying separate memories, polyglot naming/error mismatches, lack of native GC/threads today, and shows the approach works but requires careful API and performance design.
AI-written summary · about
chapters (14)
- 0:00Modern sandboxing intro
- 1:11Why app-level sandboxing matters
- 8:39Java's sandboxing history
- 10:44How browsers sandboxed
- 13:35WebAssembly origins
- 16:27WebAssembly features
- 17:32WebAssembly uses
- 19:59WebAssembly server runtimes
- 21:05Extism for Java
- 23:36Extism host functions
- 25:22Mixing languages drawbacks
- 27:09Debugging WebAssembly
- 28:55Code to data with WASM
- 30:40Architectural implications of WebAssembly








