This project of mine implements a browser-based "compute environment" with a virtual file system and terminal emulator (web shell). This setup acts as a virtual machine that emulates a Unix-like operating system and runs fully in the browser.
You can view and edit the files and create directories using the file explorer-like UI and run commands in the terminal. I built both the file explorer and terminal UI myself, with the goal to make them mobile- and touch-friendly (unlike e.g. xterm.js).
The terminal supports multiple tabs which lets you run multiple commands simultaneously. The commands are executed fully client-side and each in a separate web worker, to prevent blocking the UI thread. All tabs share the same file system which itself runs in a separate web worker.
Since the WASM builds often use synchronous APIs to interact with the file system, I implemented the inter-worker communication using SharedArrayBuffer and Atomics.
My goal is to make this project a powerful in-browser VM that can be used to run many command-line applications with no installation required.
Go ahead and try it out below!
Today, you can already run the following commands in the terminal:
Command | Description |
---|---|
cd | change directory (built-in command) |
pdftex | pdfTeX |
pdflatex | pdfLaTeX |
latex | LaTeX |
mf | Metafont |
gs | Ghostscript |
asy | Asymptote |
gftodvi | GFtoDVI |
dvipng | dvipng |
dvips | Dvips |
dvisvgm | dvisvgm |
mb | MrBayes |
muscle | MUSCLE |
makeblastdb | makeblastdb |
blastdbcmd | blastdbcmd |
blastn | blastn |
blastp | blastp |
blastx | blastx |
tblastn | tblastn |
tblastx | tblastx |
clustalo | Clustal Omega |
praat | Praat |
bowtie2-align-l | bowtie2-align-l |
bowtie2-align-s | bowtie2-align-s |
bowtie2-build-l | bowtie2-build-l |
bowtie2-build-s | bowtie2-build-s |
bowtie2-inspect-l | bowtie2-inspect-l |
bowtie2-inspect-s | bowtie2-inspect-s |
obabel | Open Babel |
Made by Anton Vasetenkov.
If you want to say hi, you can reach me on LinkedIn or via email. If you really-really like my work, you can support me by buying me a coffee.