FeaturedIT topics

Meet Wasmjit, your future embeddable WebAssembly runtime

Built with ambitions of powering the WebAssembly world, an embeddable runtime for the WebAssembly (aka Wasm) binary format is in development, called Wasmjit.

Still a proof of concept, Wasmjit is targeted as a Linux kernel module to host Emscripten-generated WebAssembly modules. Developer Rian Hunter, who previously built the Linux client for the Dropbox file-hosting service, has offered a beta release to encourage developer participation.

Wasmjit was introduced as an open source project in late September. Principal goals of Wasmjit include:

  • Serving as a minimal, embeddable runtime to power WebAssembly the way SQLite powers embedded databases. Engineers should be easily able to embed Wasmjit instead of having to build their own runtime.
  • Provision of a kernel-mode runtime for WebAssembly, to increase performance for system-call heavy loads. This would translate into cost savings for companies with heavily trafficked websites, such as Google and Facebook.

The plan at the moment is to flesh out Wasmjit enough to run “real” programs, including production-grade web servers. Integrating a runtime into the kernel could change the direction of the computer industry, enabling simplified distribution for closed-source applications and a platform-neutral userland, referring to all code that runs outside the OS kernel, Hunter said. Also, hardware could be simplified by having applications run in kernel mode.

There is a goal to have Wasmjit eventually included in the mainline Linux kernel, which would require its formal acceptance by the maintainers of Linux. But Wasmjit can function as an out-of-tree module.

First, Hunter wants to see more usage of Wasmjit. With a core written in C90, the open source runtime is intended to be easily portable to most environments. Its Linux configuration has it running in kernel space (ring 0) and providing access to system calls as normal function calls. This configuration, avoiding user-kernel translation overhead, can result in a significant performance increase for syscall-bound programs such as web servers.

Wasmjit also offers a host environment for running in user space on Posix systems. This is useful in running WebAssembly modules without having to run an entire browser.

Where to download Wasmjit

You can download Wasmjit from the project’s GitHub page, which also has detailed instructions on requirements and setup.

Related Articles

Back to top button