Waputer: A Custom OS in the Browser with a JS Kernel and WASM Userspace

Posted by marcandrysco@reddit | programming | View on Reddit | 2 comments

What if you put a whole operating system in the browser? I got a bit carried away and did exactly that with Waputer: the WebAssembly computer. It does not emulate an operating system like Linux inside the browser. It is a custom operating system with a kernel written in JavaScript, featuring a file system, process management, and a package manager. Everything beyond the kernel is compiled to WebAssembly. I even created a couple of new programming languages to go with the system. There is still much more to be built. The IDE is only a basic preview, and permanent file storage is almost ready. I am curious what people think of it, and even more curious what people can do with it.

The linked blog provides the details of how Waputer works, including the what and why of the new programming languages. It features a new backend that generates WebAssembly specifically for Waputer. You can compile a simple C program to WASM via Clang, upload it to Waputer, and run it. There are a lot of caveats that make the standard WASM output of complication less amenable to Waputer, with non-local control flow being a real nightmare. I will keep updating the blog with more technical details week by week.