characteristics* • Execution model (Interpreter, JIT or AOT) • Target platforms and workloads *Yixuan Zhang, Mugeng Liu, Haoyu Wang, Yun Ma, Gang Huang, and Xuanzhe Liu. 2025. Research on WebAssembly Runtimes: A Survey. ACM Trans. Softw. Eng. Methodol. Just Accepted (January 2025). https://doi.org/10.1145/3714465 Wasmtime High performance with JIT compilation WasmEdge Rich extensions for AI/LLM workloads
Resource Limitation Capabilities Different Status of Wasm Feature Support • Unsupported capabilities and features impose limitations on usable runtimes How can we use or implement them runtime-neutrally?
save and resume the application’s state • Needs to modify optimizations (e,g.,JIT and AOT) and runtime implementation • Self−hosted runtime−based C/R • Save states in the self-hosted runtime • No need to consider runtime differences Implemented in Chiwawa Self-hosted Runtime (JIT Compiled) Wasmtime Wasm Bytecode WasmEdge Self-hosted Runtime (Interpreted) Wasm Bytecode Checkpoint and restore
status of running Wasm bytecode • For bug detection, visualization of processing flows, and profiling • Self-hosted Runtime-based instrumentation • Detailed tracing including the state of its VM • Can use any runtime without modification Implemented in Chiwawa Self-hosted Runtime (JIT Compiled) Wasmtime Wasm Bytecode in Self-hosted Runtime WasmEdge Self-hosted Runtime (Interpreted) The self-hosted runtime's VM is not changed by the host’s optimization
self-hosted runtime as a compatibility layer • Implement interfaces for unsupported features • Compile the self-hosted runtime into Wasm executable for the host runtime • Can execute it within the scope supported by the host runtime Self-hosted Runtime (Support WASIp2 Interface) Host Runtime (Support WASI p1) z Wasm Bytecode (WASIp2) Using WASIp2 Feature Executing WASIp2 features as a WASIp1 bytecode Under consideration in Chiwawa
executed on host runtime • An instruction in an application is transformed into multiple instructions 2. Duplicated computationally expensive processing • Sandbox mechanism and WASI implementations local.get … fn handle_local_get(ctx: Context){ … let val = ctx.frame.locals[i].clone(); ctx.value_stack.push(val); … }
Parser identifies dependencies between instructions • Convert stack instructions to Immediate Value 2. Pass-through WASI implementation (without WASI interface conversion) • Redirect to the WASI implementation of a host runtime … i32.const 10 local.get 0 I32.add local.set 1 … … i32.add{10, local@0} => local@1 … Merged into a single instruction
to wasmtime) Performance Evaluation Wizard on Wizard VS. Chiwawa on Wizard (Self-Hostable Runtimes ) 1.3~1.4x performance by optimization techniques Benchmarks Wizard on Wizard Chiwawa on Wizard pi-Leibniz 26.791 19.620 N-body 14.554 9.932 Execution time (Sec.)
) Benchmarks Wizard on Wizard Chiwawa on Wizard pi-Leibniz 26.791 19.620 N-body 14.554 9.932 Performance Evaluation Chiwawa on Wasmtime VS. Wasmtime 13-426x performance degradation by increased processing Relative execution time (normalized to wasmtime) Execution time (Sec.)
features and runtime capabilities • Can run on any runtime • Significant performance overhead • Performance optimization techniques are essential • My future goal is to achieve performance equivalent to execution in existing interpreter runtimes Chiwawa: https://github.com/oss-fun/chiwawa