HeadlinesBriefing favicon HeadlinesBriefing.com

Kandelo: POSIX WASM Kernel for Browsers

Hacker News •
×

Kandelo is an experimental, open-source, Wasm-based multi-process kernel that runs POSIX programs in browsers and Node.js. It already supports a substantial range of existing software, including Nginx, PHP, and WordPress. The project is being explored as a foundation for WordPress Playground and as a browser-based sandbox for agents. Additional demos include the LÖVE game engine, SNKRX, Commander Keen in DOSBox, and an LXDE desktop proof of concept. Note that demos are tested on desktop browsers with large disk images (~50MB) that may take time to boot initially.

The architecture features a central single-worker kernel providing POSIX syscalls, with each process as a dedicated worker with independent memory. Threads are dedicated workers sharing memory within the same process. Syscalls use SharedArrayBuffer and Atomics API, with fork() support. The system centers around virtual file system images containing lazy references to programs.

The creator initially expected to offer compromises for POSIX compatibility but was surprised by how well the system worked without them. Nginx, PHP, Python, Ruby, Redis, and MariaDB were built using the SDK with minimal hacks.