Abstract
JavaScript (JS) is widely used across web browsers, plugin ecosystems, and many applications. However, its execution performance is often insufficient for compute-intensive workloads, motivating developers to adopt WebAssembly (Wasm) to accelerate critical code paths. Although modern JS engines support Wasm, their implementations are resource-intensive, which limits their practicality on resource-constrained devices. This paper presents QJWasm, a lightweight runtime system that integrates Wasm execution into QuickJS via architecture-level co-design. Rather than simply embedding a Wasm runtime, QJWasm introduces a cross-runtime memory model that unifies object lifetime management across the JS and Wasm runtimes. It also provides an asynchronous communication framework between the QuickJS thread and the WA2X (a lightweight, AOT-capable Wasm runtime) thread, restructuring JS-to-Wasm request dispatch, Wasm-to-JS callback forwarding, and Promise-based result delivery through a dedicated three-channel protocol integrated with the QuickJS event loop. Experiments on Lichee Zero show that these designs substantially reduce the overhead of asynchronous JS-to-Wasm invocation with large arguments and improve efficiency for compute-heavy JS workloads migrated to Wasm. In particular, QJWasm consistently accelerates numerical and data-intensive benchmarks while maintaining a modest memory footprint. These results indicate that architecture-aware JS-Wasm integration can deliver practical performance gains in lightweight runtimes without sacrificing development flexibility.
| Original language | English |
|---|---|
| Article number | 103926 |
| Journal | Journal of Systems Architecture |
| Volume | 179 |
| DOIs | |
| State | Published - Oct 2026 |
Keywords
- JavaScript engine
- Programming languages
- Software engineering
- System integration
- WebAssembly
Fingerprint
Dive into the research topics of 'QJWasm: A lightweight runtime system for efficient WebAssembly execution in resource-constrained environments'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver