Photo

Putting the asm in Wasm: from bytecode to native

Edoardo Vacchi

from Tetrate

About speaker

WebAssembly Core Engineer (Tetrate) During my PhD, I researched language design and implementation at University of Milan. I have worked at UniCredit Bank’s R&D department, and at Red Hat in the KIE Group on Drools and Kogito. I have also contributed to Quarkus.

About speakers company

Started by Istio founders, Tetrate is an enterprise service mesh company. Tetrate contributes to several open-source projects including Istio, Envoy, wazero, func-e, Coraza WAF, Apache SkyWalking, and Zipkin.

Abstracts

A WebAssembly runtime is an embeddable virtual machine. This allows platforms to dynamically load and execute third-party bytecode without rebuilding their OS and Arch-specific binary. While WebAssembly is a W3C standard, there are a lot of mechanics required to do this, and many critical aspects are out-of-scope, so left to the implementation.

Most presentations discuss WebAssembly at a high level, focusing on how end users write a program that compiles to Wasm, with a high-level discussion of how a virtual machine enables this technology. This presentation goes the other way around. This talk overviews a function call beginning with bytecode, its translation to machine code, and finally how it is invoked from host code.

The implementation used for discussion is the wazero runtime, so this will include some anecdotes that affect these stages, as well as some design aspects for user functions that allow them to behave more efficiently. However, we will also indulge in a high-level comparison with other runtimes and similar technologies that in the past tried to solve the same problem.

When you leave, you'll know how one WebAssembly runtime implements function calls from a technical point of view.

The talk was accepted to the conference program