Skip to content

eliot-akira/wasmos

 
 

Repository files navigation

WasmOS

WasmOS is a microkernel developed based on the Microkernel Book. It implements a WebAssembly (Wasm) "userland", and all binaries are executed in Ring 0 using WAMR (Wasm Micro Runtime).

Start

First clone this repository, remember to add the --recursive option to use WAMR as a submodule.

git clone --recursive https://github.com/eliot-akira/wasmos

Next, build and run WasmOS. The easiest way is to use Dev Container. Launch the container and execute following commands. If you're not using it, please refer to the Dockerfile, install the required packages, and build it.

# Install required packages when not using .devcontainer
sudo apt install -y llvm clang lld python3-pip qemu-system gdb-multiarch
pip3 install --user -r tools/requirements.txt

make                # Build WasmOS
make V=1            # Build WasmOS (Output detailed build logs)
make run            # Run WasmOS in qemu (single core)
make run CPUS=4     # Run WasmOS in qemu (4 cores)

If it starts successfully, the shell server is launched and you can execute following commands.

start hello         # Run a helllo-world program
start wasm_ping     # Run a Wasm binary that uses message passing APIs
start wasm_webapi   # Run a toy web server (Wasm binary). Access localhost:1234 to see the page

About

Microkernel that runs WebAssembly natively

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 87.3%
  • Python 5.4%
  • Makefile 4.8%
  • Assembly 2.5%