This repository is part of the "Execute untrusted customer code on the server with Web Assembly (Wasm) components" blog post.
It contains a web server that exposes a POST endpoint at http://127.0.0.1:8080/run. The request payload is a WebAssembly component binary which will be executed in a Rust WebAssembly engine.
The Wasm Interface Type (WIT) used by this engine can be found at ./wit/world.wit.
To look at examples of how to create a WebAssembly component for this engine:
For guides to write Wasm components in other languages, please refer to the official docs.
- Install Devbox
curl -fsSL https://get.jetify.com/devbox | bash
- Run the web server
devbox run dev
- Build and deploy either a Rust or Javascript Wasm component.