antvaset.com
/
wasm-shell

WASM Shell

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!

Demo

WASM shell
Select a file to view or edit.

The list of supported commands

Today, you can already run the following commands in the terminal:

CommandDescription
cdchange directory (built-in command)
pdftexpdfTeX
pdflatexpdfLaTeX
latexLaTeX
mfMetafont
gsGhostscript
asyAsymptote
gftodviGFtoDVI
dvipngdvipng
dvipsDvips
dvisvgmdvisvgm
mbMrBayes
muscleMUSCLE
makeblastdbmakeblastdb
blastdbcmdblastdbcmd
blastnblastn
blastpblastp
blastxblastx
tblastntblastn
tblastxtblastx
clustaloClustal Omega
praatPraat
bowtie2-align-lbowtie2-align-l
bowtie2-align-sbowtie2-align-s
bowtie2-build-lbowtie2-build-l
bowtie2-build-sbowtie2-build-s
bowtie2-inspect-lbowtie2-inspect-l
bowtie2-inspect-sbowtie2-inspect-s
obabelOpen 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.