Skip to main content

OS Mode Features

Multi-Language Runtimes

Language runtimes are fetched from wasmhub and cached locally at ~/.wasmrun/runtimes/:

LanguageRuntimeDetection
Node.js / JavaScriptQuickJSpackage.json
PythonRustPythonrequirements.txt, pyproject.toml
RustRust WASM runtimeCargo.toml
GoGo WASM runtimego.mod

Runtimes are downloaded on first use with SHA-256 checksum validation.

Browser UI

The OS mode UI provides several panels:

  • Console — live stdout/stderr with color-coded streams (green for stdout, red for stderr, blue for system) and timestamps
  • Filesystem — browse the WASI virtual filesystem populated from your project files
  • Kernel Status — active processes, memory usage, WASI capabilities, supported languages
  • Logs — structured log trail from kernel, server, and runtime events
  • Application — iframe for app output (when running web servers)

Virtual Filesystem

Project files are served via GET /api/project/files as a base64-encoded JSON bundle:

  • .gitignore patterns respected (glob matching with *, **, ?, negation)
  • Default ignore patterns for node_modules, target, .git, __pycache__, binary files
  • Size limits: 10MB per file, 50MB total, 5000 file cap
  • Files are decoded in the browser and written to the WASI virtual FS

Network Isolation

Each process runs in its own network namespace:

  • Isolated port bindings (no conflicts between processes)
  • Port forwarding from guest to host
  • Connection tracking and stats
  • Per-process network statistics

See Network Isolation for details.

Port Forwarding

Expose services running in isolated namespaces:

wasmrun os ./app --forward 8080:3000

See Port Forwarding for details.

Public Tunneling

Expose local apps to the internet via bore.pub:

  • Built-in bore client (Rust implementation)
  • Automatic reconnection
  • Optional authentication for private servers
  • Start/stop/status via REST API

See Public Tunneling for details.

REST API

OS mode exposes a JSON API:

EndpointMethodDescription
/api/kernel/statsGETKernel statistics (processes, memory, capabilities)
/api/fs/statsGETFilesystem statistics
/api/fs/read/<path>GETRead file contents
/api/fs/list/<path>GETList directory
/api/fs/write/<path>POSTWrite file
/api/fs/mkdir/<path>POSTCreate directory
/api/fs/delete/<path>POSTDelete file
/api/project/filesGETGet all project files (base64 bundle)
/api/runtime/<language>GETServe cached runtime WASM binary
/api/runtimesGETAvailable runtimes manifest
/api/logsGETAll structured logs
/api/logs/recentGETRecent logs
/api/kernel/startPOSTStart project
/api/kernel/restartPOSTRestart project
/api/tunnel/startPOSTStart bore tunnel
/api/tunnel/statusGETTunnel status
/api/tunnel/stopPOSTStop tunnel
/api/processes/<pid>/portsGETList port mappings
/api/processes/<pid>/forwardPOSTCreate port forward