Parse < (stdin from file), > (stdout to file), and >> (append) in
the command line. Files are read from and written to the persistent
virtual filesystem, so redirected output persists across commands.
Explain that constructs like if/while/for, globbing, and variable
expansion are shell features, not coreutils features, and why they
are not available in the playground's minimal JS shell.
browser_wasi_shim's Filestat.write_bytes() uses setUint8 for the
1-byte filetype field at offset 16, leaving bytes 17-23 unwritten.
Since Rust allocates the stat buffer with MaybeUninit, those padding
bytes contain stack garbage that corrupts the struct.
Fix by replacing write_bytes with a version that writes filetype as
a full 8-byte BigUint64 (zero-extended), clearing the padding.
Also add a test asserting file sizes are reasonable.
Patch browser_wasi_shim File/Directory stat() to return current
timestamps instead of epoch 0 (which showed Jan 1 1970).
Patch path_filestat_get and path_open to resolve ".." at the
preopened root to "." instead of failing with NOTCAPABLE, matching
real filesystem behavior.
- Clone WASM response before compileStreaming so fallback doesn't re-fetch
- Guard against concurrent ensureRuntime() calls with a promise cache
- Replace inline onclick with event delegation for CSP compatibility
- Add SRI note for WASI shim dynamic import
- Skip l10n tests that require French translations in WASM binary
- Replace uninteresting fmt example with printf sheep | nl
- Hide Playground link from top navigation for now
- Browser-based unit tests (111 tests) covering parsing, builtins,
pipes, UTF-8, l10n, virtual filesystem, and WASM integration
- Headless Puppeteer test runner (scripts/run-tests.js)
- CI workflow step to build WASM and run tests
A browser-based terminal that runs real Rust coreutils compiled to
WebAssembly (wasm32-wasip1) using @bjorn3/browser_wasi_shim.
Features:
- xterm.js terminal with command history and line editing
- Pipe support (cmd1 | cmd2 | cmd3), file redirects (>)
- Persistent virtual filesystem across commands
- cd/pwd builtins with virtual working directory
- Locale support (locale builtin + selector)
- UTF-8/multibyte correct output (raw ConsoleStdout, fixed args_sizes_get)
- Click-to-run example buttons
- Inline wasm_example shortcode for blog posts