typed-wasm: Applying Database Query Type Safety to WebAssembly Linear Memory
Jonathan D.A. Jewell · Zenodo (CERN European Organization for Nuclear Research) · 2026
WebAssembly linear memory is an untyped byte array shared across module boundaries. We present typed-wasm, a type system that applies a 10-level progressive type safety framework to Wasm linear memory. The system treats memory segments as typed region schemas and load/store operations as typed projections verified at compile time. Formalised in Idris 2 with Quantitative Type Theory (QTT), with proofs erased before code generation yielding zero runtime overhead. Principal contribution: multi-module schema agreement — static verification that independently compiled Wasm modules agree on shared memory layout.