Learn How wasmtime Works with WebAssembly Modules and Components
In this Shortcut, I am finally going to introduce you to the man behind the wasmtime
curtain. OK, I’m using a metaphor; there is no man behind the curtain. But I am going to give you a deeper sense of what is going on to enable several of the wasmtime
-based examples we have used in recent Shortcuts. Keep in mind that wasmtime
is just one implementation of a WASI-enabled host environment. Other host environments will have similar ideas but may work slightly differently.
Also keep in mind that I am showing you a standalone, custom host application. You may have followed along as I previously ran the wasmtime
executable on its own. The executable is able to invoke behavior in components and modules, a topic we will revisit in a future Shortcut. If you have followed any of the recent WASI-related Shortcuts, you will have seen the example-host
application that I frequently used to run an add
function from various WebAssembly components. We will return to that application’s implementation shortly, but for now I am just going to walk you through a standalone version of the wasmtime
“Hello, World!” example.
In the GitHub repository for this Shortcut, enter the directory 26-Wasmtime-Dive
. In it, you will find only a readme.md
file describing the installation instructions for the tools so you can follow along. You will do everything else by hand.
Once you’ve installed ...
Get Learn How wasmtime Works with WebAssembly Modules and Components now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.