JUG Milano Meeting #167
Giovedì 15 Gennaio 2026
The ART of Running Wasm: A Tale of Three Bytecodes
La registrazione dell'intervento è su https://www.youtube.com/watch?v=u3s6Om1XinY.
Evento ibrido online ed in presenza.
La partecipazione **in presenza** è gratuita e libera, ma è OBBLIGATORIA la registrazione su: form di registrazione per partecipare a JUG Milano in presenza
La partecipazione **in presenza** è gratuita e libera, ma è OBBLIGATORIA la registrazione su: form di registrazione per partecipare a JUG Milano in presenza
Abstract dell'intervento:
What happens when JVM bytecode, Dalvik bytecode, and WebAssembly bytecode walk into the same library? Chicory is a pure-Java WebAssembly runtime that can both interpret Wasm binaries and compile them into Java bytecode: either at build-time for efficiency or at runtime for dynamic loading. This works perfectly on the JVM, but Android's ART runtime runs Dalvik bytecode. So what happens when you need to dynamically load Wasm modules on Android? In this talk, we'll explore our journey writing a new Android backend for the Chicory compiler. We'll dive into the architectural differences between stack-based JVM bytecode and register-based Dalvik bytecode, show how we generate DEX files at runtime using DexMaker, and reveal the other technical challenges we found along the way. We'll also discover the surprising similarities between these VMs and how to exploit them: did you know that the ART VM can be started like a regular JVM? Through practical examples and live demonstrations, this tale of three bytecodes will give you a unique perspective on how different runtimes really work under the hood.
What happens when JVM bytecode, Dalvik bytecode, and WebAssembly bytecode walk into the same library? Chicory is a pure-Java WebAssembly runtime that can both interpret Wasm binaries and compile them into Java bytecode: either at build-time for efficiency or at runtime for dynamic loading. This works perfectly on the JVM, but Android's ART runtime runs Dalvik bytecode. So what happens when you need to dynamically load Wasm modules on Android? In this talk, we'll explore our journey writing a new Android backend for the Chicory compiler. We'll dive into the architectural differences between stack-based JVM bytecode and register-based Dalvik bytecode, show how we generate DEX files at runtime using DexMaker, and reveal the other technical challenges we found along the way. We'll also discover the surprising similarities between these VMs and how to exploit them: did you know that the ART VM can be started like a regular JVM? Through practical examples and live demonstrations, this tale of three bytecodes will give you a unique perspective on how different runtimes really work under the hood.
A cura di Edoardo Vacchi:
Edoardo is a Principal Machine Learning Engineer at Red Hat. During his PhD he researched language design and implementation at University of Milan. He has worked at UniCredit Bank’s R&D department; at Red Hat he worked on Drools and Kogito; he joined Tetrate as a core team member of the wazero WebAssembly runtime, and at Dylibso he contributed to both Chicory and wazero. He is currently back at Red Hat in the AI department, working on LLM-D.
Edoardo is a Principal Machine Learning Engineer at Red Hat. During his PhD he researched language design and implementation at University of Milan. He has worked at UniCredit Bank’s R&D department; at Red Hat he worked on Drools and Kogito; he joined Tetrate as a core team member of the wazero WebAssembly runtime, and at Dylibso he contributed to both Chicory and wazero. He is currently back at Red Hat in the AI department, working on LLM-D.