WASM has landed!

Jan. 25, 2022  ·  by Kevin Boos

Running WASM + WASI modules in a safe OS kernel

🚀🚀 WASM has now landed in Theseus! 🚀🚀

With PR #472 being merged in, Theseus's main branch allows you to execute WASM modules (as precompiled WASM binaries) that use both the core WASM specification and basic WASI extensions.

See our previous blog post for more about this effort.

How to use and run WASM on Theseus

Theseus doesn't yet support running an actual compiler, so you first need to download a pre-compiled WASM binary on the Theseus command line or package one up into the OS image itself during build time. We describe the latter approach below.

Theseus's build tooling now supports including arbitrary "extra files" in the generated OS .iso image; click here to read more about that feature. All you have to do is put whatever files you want included into the extra_files/ directory in the source code repository. Presto-magic-change-o, these extra files will be automatically loaded into Theseus's in-memory filesystem upon boot, in the /extra_files directory.

Once you have a WASM binary, running it is easy with the wasm command:

wasm /path/to/wasm/binary [args]

For example, try out the exorbitant interactive calculator like so:

wasm /extra_files/wasm/exorbitant.wasm

exorbitant demo


Our work on wasmtime atop Theseus is still ongoing. Please check back for more updates soon!



<< Previous Post Next Post >>