- New page /ai-playground with text input for plain English descriptions
- LLM (OpenAI-compatible) translates to uutils shell commands
- Commands run in existing WASM terminal
- API key stored in localStorage only, never touches uutils servers
- Works with OpenAI, Mistral, Groq, Ollama, any OpenAI-compatible endpoint
- History of past queries with one-click re-run
- Settings modal (key, model, base URL)
- Responsive CSS, dark mode support
- Nav link added in base.html
Add uutils/sed to the playground alongside grep, find and diff/cmp. sed
builds a single `sed` binary and, like diffutils, has only pure-Rust
dependencies (fancy-regex and regex, not onig), so its WASM build needs no
WASI SDK — it joins the wasm-standalone matrix with needs_wasi: false.
Register sed as its own on-demand standalone module (sed -> sed.wasm), add
it to the fallback command list, the help/load hints, a substitution
example, the version footer, and tests (stdin substitution, global
substitution over a file, and -n line selection).
Add uutils/diffutils to the playground alongside grep and find. The
diffutils binary is a multicall that provides diff and cmp, dispatched on
argv[0], so each command is invoked directly by name. Unlike grep/find it
has only pure-Rust dependencies (regex, not onig), so its WASM build needs
no WASI SDK.
Generalize the standalone-module registry from command->url to
module->{url, commands} so one module can back several commands: diff and
cmp share a single diffutils.wasm, load once on demand, and get one 'Load'
button. Add a couple of near-identical shopping-*.txt sample files so diff
and cmp have a small, readable change to show, plus a diff example, help
entry, version footer, and tests (diff/cmp exact-match; diff -u checked on
its hunk body, since its header carries an environment-dependent mtime).
The standalone WASM modules (grep ~1.4 MB, find ~2.0 MB) were fetched
eagerly at startup, adding ~3.4 MB (~22%) to the initial download for
visitors who never use them. Load them on demand instead: the first time
a command runs it auto-loads its module (with a live 'loading… done'
notice), and a row of 'Load' buttons lets visitors pre-warm them. A
shared in-flight map dedupes a click and a command racing to load the
same module, and buttons stay in sync via a 'uutils:program-loaded'
event whether the module was loaded by click or by use.
Generalize the single-module grep handling into a registry of standalone
WASM modules so additional uutils tools can drop in. Add `find`, built from
uutils/findutils to wasm32-wasip1 in CI, with graceful degradation when the
binary is absent.
Only `find` is shipped: xargs/locate/updatedb need process spawning or an
on-disk database, neither of which works in the browser WASI sandbox.
Add an emoji `find . -name '*.md'` example backed by fruit-emoji files in the
virtual FS to show off Unicode/multibyte filename matching, plus tests.
grep ships as its own standalone WASM module (not part of the coreutils
multicall binary) and depends on the Oniguruma C library, so the website
workflow now checks out uutils/grep, installs the WASI SDK to provide a
wasm sysroot for the onig_sys C sources, builds grep.wasm, and appends
"grep" to the generated command list.
The terminal loads grep.wasm as an optional second module and dispatches
grep directly (argv[0] = "grep"). grep defaults to --color=never since the
WASI shim reports stdout as a TTY, which would otherwise emit match-
highlight escapes that corrupt piped output; explicit --color is honored.
Adds a grep emoji example and grep WASM integration tests.
Previously the list of WASM-bundled utilities was hardcoded in
wasm-terminal.js and playground.md, which drifted from the actual
feat_wasm feature in coreutils/Cargo.toml (e.g. dd, tty, yes were
missing). The website workflow now parses feat_wasm at build time
and emits static/wasm/commands.js, which the terminal prefers over
its built-in fallback list.
Emit a version.js alongside the WASM binary in CI recording the
coreutils commit used for the build, and display it under the
terminal with a link to the commit on GitHub.
Upstream coreutils-l10n updated the French translation of arch-about
from "Afficher l'architecture de la machine" to "Affiche l'architecture
de la machine", which was causing the WASM terminal test to fail in CI.
Remove the jsFallback function and its tests. Commands now require
the WASM binary to be loaded. If WASM is still loading, a "please
wait" message is shown instead of running JS approximations.
Prevent the browser from closing the tab when Ctrl+W is pressed
while the terminal is focused. Instead, handle it as the standard
terminal "delete previous word" action.
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.
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