Indexed Types for a Statically Safe WebAssembly
Adam T. Geller, Justin Frank, William J. Bowman
Abstract
We present Wasm-precheck, a superset of WebAssembly (Wasm) that uses indexed types to express and check simple constraints over program values. This additional static reasoning enables safely removing dynamic safety checks from Wasm, such as memory bounds checks. We implement Wasm-precheck as an extension of the Wasmtime compiler and runtime, evaluate the run-time and compile-time performance of Wasm-precheck vs Wasm configurations with explicit dynamic checks, and find an average run-time performance gain of 1.71 x faster in the widely used PolyBenchC benchmark suite, for a small overhead in binary size ( 7.18 % larger) and type-checking time (1.4% slower). We also prove type and memory safety of Wasm-precheck, prove Wasm safely embeds into Wasm-precheck ensuring backwards compatibility, prove Wasm-precheck type-erases to Wasm, and discuss design and implementation trade-offs.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4a3456a9-3240-4f4c-9aa2-655b6628512dCited by top-tier papers2
- A Flow-Sensitive Refinement Type System for Verifying eBPF ProgramsAmeer Hamza, Lucas Zavalía, Arie Gurfinkel, Jorge A. Navas et al.OOPSLA 2025 · 1 citation
- Bringing Managed Language Support to WebAssembly with External Library LinkingShuyao Jiang, Ruiying Zeng, Yangfan Zhou, Michael R. LyuFSE 2026
Builds on2
- Safer at any speed: automatic context-aware safety enhancement for RustNatalie Popescu, Ziyang Xu, Sotiris Apostolakis, David I. August et al.OOPSLA 2021 · 7 citations
- VectorVisor: A Binary Translation Scheme for Throughput-Oriented GPU AccelerationSamuel Ginzburg, Mohammad Shahrad, Michael J. FreedmanUSENIX ATC 2023 · 6 citations
Related papers
- Provably-Safe Multilingual Software Sandboxing using WebAssemblyJay Bosamiya, Wen Shih Lim, Bryan ParnoUSENIX Security 2022
- MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe CodeAlexandra E. Michael, Anitha Gollamudi, Jay Bosamiya, Evan Johnson et al.POPL 2023 · 22 citations
- Exploring and Exploiting the Resource Isolation Attack Surface of WebAssembly ContainersZhaofeng Yu, Dongyang Zhan, Lin Ye, Haining Yu et al.USENIX Security 2025
- WaVe: a verifiably secure WebAssembly sandboxing runtimeEvan Johnson, Evan Laufer, Zijie Zhao, Dan Gohman et al.S&P 2023
- Progressful Interpreters for Efficient WebAssembly MechanisationXiaojia Rao, Stefan Radziuk, Conrad Watt, Philippa GardnerPOPL 2025 · 3 citations
