Browsix is our answer to these challenges, featuring:
Unmodified C, C++, Go, and Node.js programs run as processes on Web Workers, executing in-parallel with the main browser thread – no need to worry about long-running computations blocking event-handling or page rendering.
By working at the lowest levels of abstraction, Browsix provides shared resources to multiple language runtimes, just as traditional operating systems enable running programs written in a host of languages.
By enabling a large class of programs (including legacy codebases) to run in-browser, Browsix can free you from the chore of sandboxing and load-balancing programs server-side.
A Unix terminal exposing the dash POSIX shell lets developers compose functionality and inspect Browsix state in a familiar way. (view source)
In-browser editor that runs pdflatex and bibtex to generate PDFs. Required < 150 LoC to orchestrate these applications. (view source)
Browsix is a framework that bridges the considerable gap between conventional operating systems and the browser, enabling unmodified programs expecting a Unix-like environment to run directly in the browser. Browsix does this by mapping low-level Unix primitives, like processes and system calls, onto existing browser APIs, like Web Workers and postMessage.
Browsix brings all of these abstractions into unmodified browsers, and is isolated and secured to the same extent any normal web page is: at the level of the browser tab.
Processes are built on top of Web Workers, letting
applications run in parallel and spawn
subprocesses. System calls include
kill(2) and signal handlers.
Shared Filesystem accessible from multiple processes.
Pipes are supported with
pipe(2) enabling developers to compose processes into pipelines.
Sockets include support for TCP socket servers and clients, making it possible to run applications like databases and HTTP servers together with their clients in the browser.
Browsix comprises two core parts:
We will soon have more push-button instructions for integrating Browsix into your project. For now, check out GitHub for more details.