A browser-hosted "micro-OS" shell that runs two kinds of sandboxed WASM apps:
- wasm-bindgen modules (UI-integrated apps like Calculator) - JS-callable WebAssembly
- WASI modules (command-line programs) - Standalone binaries running under
@bjorn3/browser_wasi_shim
- πͺ Window Manager with draggable windows
- π File Browser for VFS management (create, edit, delete files)
- π Zynqpad Text Editor - Edit all text file types (HTML, CSS, JS, Python, etc.)
- π’ Calculator (WASM via wasm-bindgen)
- π» WASI Terminal with command history (β/β arrows)
- π Python Support - Pyodide integration with REPL and package manager
- π Kernel Shell - Command-line shell as WASI binary
- πΎ Virtual File System (IndexedDB-based with WASI sync)
- π¦ .mapp Package Importer for bundled applications
- π οΈ WASI Utilities (ls, cat, mkdir, rm, touch)
- βοΈ Cloud Storage - Google Drive & GitHub repo sync
- π Peer-to-Peer Sync - Data stored in user's own GitHub repo
- β±οΈ Activity Tracking - Daily active time tracking with auto-reset
- File Browser - Browse and manage VFS files
- Text Editor - Edit text files with VFS persistence
- Calculator - Basic calculator with WASM compute
- Terminal - Run WASI binaries and utilities
- Package Importer - Import .mapp application bundles
- Settings - System configuration with sync controls
- shell.wasm - ZynqOS kernel shell with built-in commands
- ls.wasm - List directory contents
- cat.wasm - Display file contents
- mkdir.wasm - Create directories
- rm.wasm - Remove files and directories
- touch.wasm - Create empty files
- terminal-wasi.wasm - Sample WASI program
ZynqOS implements a hybrid peer-to-peer sync architecture:
- Minimal server storage: Only user ID, active time, and preferences stored on server
- P2P data storage: Files, logs, and audit trails stored in user's own GitHub repo (
microos-data) - Flexible sync: Manual sync button + auto-sync with configurable intervals (5m - 3h)
- Daily reset: Active time automatically resets at midnight UTC
See docs/SYNC_SYSTEM.md for details.
Tested on a clean machine with Node.js 20 LTS and npm 10.
- Node.js 20 LTS
- npm 10+
- Git
npm installnpm run devOpen http://localhost:5173
After setup, run the quality checks used in CI:
npm run lint
npm run format:check
npm run test
npm run buildSee CONTRIBUTING.md for pull request requirements, commit message conventions, code style, and review expectations.
- GitHub Issues: use the repository issue tracker for bugs and feature requests
- Discord: ZynqOS community server linked from the package creation guide
npm run dev- Start Vite dev servernpm run build- Build production bundlenpm run preview- Preview production buildnpm run build-wasm- Build all WASM modules (callsbuild-wasm.ps1)npm run lint- Run ESLintnpm run format:check- Verify formatting with Prettiernpm run test- Run the unit test suite
.\scripts\build-wasm.ps1- Builds both calculator and WASI terminal.\scripts\build-wasi.ps1- Builds only WASI terminal (wasm32-wasip1)
./scripts/build-wasm.sh- Build wasm-bindgen calculator
The terminal supports command history - use β/β arrow keys to navigate previous commands.
WASI binaries can be run in three ways:
- From URL/Path:
run /apps/wasm/shell.wasm help - From VFS:
run /vfs/path/to/app.wasm(if stored in IndexedDB VFS) - Upload: Click "Upload" button or type
uploadcommand
The terminal has quick-run buttons for common operations:
- π Shell - Run kernel shell with help command
- π ls / - List root directory using shell
- π cat - Display /input.txt using shell
- π pwd - Print working directory
- βΉοΈ stat - Show file information
- β‘ version - Show kernel version
When running shell.wasm, available commands:
help- Show available commandsls [path]- List directory contentscat <file>- Display file contentspwd- Print working directoryecho <text>- Echo text to stdoutstat <path>- Show file informationversion- Show kernel version
Example usage:
run /apps/wasm/shell.wasm ls /
run /apps/wasm/shell.wasm cat /input.txt
run /apps/wasm/shell.wasm echo "Hello from WASI!"
run /apps/wasm/shell.wasm versionIndividual utility binaries are also available:
# List directories
run /apps/wasm/ls.wasm /
run /apps/wasm/ls.wasm /home
# Display files
run /apps/wasm/cat.wasm /input.txt
run /apps/wasm/cat.wasm /home/demo.txt
# Create directories
run /apps/wasm/mkdir.wasm /data
run /apps/wasm/mkdir.wasm /home/user
# Create files
run /apps/wasm/touch.wasm /test.txt
# Remove files/directories
run /apps/wasm/rm.wasm /test.txtAll file changes made by WASI programs are automatically synced back to the IndexedDB VFS!
This means you can:
- Create files with
touchormkdir - Check them in the File Browser app
- Edit them in Zynqpad (supports HTML, CSS, JS, Python, Markdown, and more!)
- Read them with
catin future terminal sessions
Default mounted files:
/input.txt- Sample text file/home/demo.txt- Demo file
ZynqOS includes full Python support via Pyodide:
# Interactive Python REPL
python
# Run Python scripts from VFS
python /home/script.py
# Execute Python code directly
python -c "print('Hello from Python!')"
# Install Python packages
pip install numpy
pip install requests
# List installed packages
pip listPython can access ZynqOS VFS files using the built-in open_vfs() function:
# Read a file from VFS
content = open_vfs('/home/data.txt', 'r')
# Write to VFS
with open_vfs('/home/output.txt', 'w') as f:
f.write('Hello from Python!')help- Show available commandspython/python3- Start Python REPL or run scriptspip install <pkg>- Install Python packagespip list- List installed Python packagesrun <url|path> [args...]- Run WASI binaryupload- Upload and run local .wasm fileclear- Clear terminal output
apps/
calculator-wasm/ # Rust WASM calculator (wasm-bindgen)
kernel-shell/ # Kernel shell WASI binary
terminal-wasi/ # Sample WASI program
wasi-utils/ # WASI utility binaries
ls/ # Directory listing
cat/ # File display
mkdir/ # Create directories
rm/ # Remove files/dirs
touch/ # Create files
wasm/ # Built WASM outputs (temp)
public/
apps/wasm/ # Public WASM files served by Vite
scripts/
build-wasm.ps1 # Windows: Build all WASM
build-wasi.ps1 # Windows: Build WASI modules
build-wasm.sh # Linux/macOS: Build wasm-bindgen modules
src/
apps/ # Application UI components
calculator/ # Calculator UI
terminal/ # WASI terminal UI
text-editor/ # Text editor UI
file-browser/ # VFS file manager
mapp-importer/ # Package importer
components/ # Window manager, taskbar, launcher
vfs/ # Virtual file system (IndexedDB)
fs.ts # VFS API (readFile, writeFile, etc.)
init.ts # Auto-initialize sample files
wasm/ # WASM loaders
On Windows with x86_64-pc-windows-gnu toolchain, use wasm32-wasip1 target instead of wasm32-wasi:
rustup target add wasm32-wasip1
cargo build --target wasm32-wasip1 --releaseThe scripts automatically handle this.
- Frontend: React + Vite + TypeScript + Tailwind CSS v4
- VFS: IndexedDB via
idblibrary - WASM:
- wasm-bindgen for web-integrated modules
- @wasmer/wasi + @wasmer/wasmfs for WASI runtime
- Build: Vite, wasm-pack, cargo
The window manager exposes a global function for opening windows:
(window as any).ZynqOS_openWindow(title: string, content: ReactNode)Apps are mounted via the Taskbar or Launcher components.