Indexed Types for a Statically Safe WebAssembly

4Citations
Citations of this article
6Readers
Mendeley users who have this article in their library.

Abstract

We present Wasm-prechk, 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-prechk as an extension of the Wasmtime compiler and runtime, evaluate the run-time and compile-time performance of Wasm-prechk vs WebAssembly configurations with explicit dynamic checks, and find an average run-time performance gain of 1.71x 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-prechk, prove Wasm safely embeds into Wasm-prechk ensuring backwards compatibility, prove Wasm-prechk type-erases to Wasm, and discuss design and implementation trade-offs.

Cite

CITATION STYLE

APA

Geller, A. T., Frank, J., & Bowman, W. J. (2024). Indexed Types for a Statically Safe WebAssembly. Proceedings of the ACM on Programming Languages, 8, 2395–2424. https://doi.org/10.1145/3632922

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free