Paul Krill
Editor at Large

WebAssembly comes to Apache web server

news
Oct 12, 20222 mins

VMware Labs’ mod_wasm is an extension module for the Apache HTTP Server that serves WebAssembly binaries as endpoints.

futuer blast hyper drive matrix
Credit: Thinkstock

VMware Labs has unveiled an extension module for Apache’s popular web server that runs WebAssembly binaries, opening new possibilities for languages and projects to run securely in Apache.

The mod_wasm extension module allows the Apache HTTP Server to reply to HTTP requests with applications compiled to WebAssembly. Internally, mod_wasm uses the Wasmtime secure runtime to configure and run Wasm modules.

When an Apache HTTP Server is run with mod_wasm enabled, the Wasm module is preloaded into memory as part of a process to speed up request handling by not loading the Wasm module from scratch every time a request is received.

Unveiled on GitHub earlier this month, mod-wasm is composed of two libraries:

  • mod_wasm.so, which provides an interface between the Apache C API and Rust library to manage the Wasm runtime. This library is responsible for Apache configuration options and the bindings to connect the Rust library with Apache.
  • libwasm._runtime.so, which receives HTTP requests from Apache, configuring and running the Wasm module. It also parses the response and returns control to mod_wasm.so.

WebAssembly, or Wasm, is a binary instruction format and stack-based virtual machine that provides high performance for web applications. It was designed as a portable compilation target for programming languages including C, C++, and Rust.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author