WAMI: Compilation to WebAssembly through MLIR without Losing Abstraction
Byeongjee Kang, Harsh Desai, Limin Jia, and Brandon Lucia

TL;DR
This paper introduces a new MLIR-based compilation pipeline for WebAssembly that preserves high-level abstractions, enabling efficient and extensible support for advanced features like Stack Switching without significant performance loss.
Contribution
It presents a novel MLIR pipeline with dedicated Wasm dialects for direct high-level code generation, avoiding abstraction loss and reducing redundant implementation efforts.
Findings
Achieves at most 7.7% slower performance on benchmarks
Enables direct high-level Wasm code generation within MLIR
Supports high-level features like Stack Switching effectively
Abstract
WebAssembly (Wasm) is a portable bytecode format that serves as a compilation target for high-level languages, enabling their secure and efficient execution across diverse platforms, including web browsers and embedded systems. To improve support for high-level languages without incurring significant code size or performance overheads, Wasm continuously evolves by integrating high-level features such as Garbage Collection and Stack Switching. However, existing compilation approaches either lack reusable design -- requiring redundant implementation efforts for each language -- or lose abstraction by lowering high-level constructs into low-level shared representations like LLVM IR, which hinder the adoption of high-level features. MLIR compiler infrastructure provides the compilation pipeline with multiple levels of abstraction, preserving high-level abstractions throughout the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSecurity and Verification in Computing · Logic, programming, and type systems · Parallel Computing and Optimization Techniques
