upload-artifact@v7 artifacts are not readable by download-artifact@v8,
causing the WASM artifacts to be missing in the build job and failing
the playground JS tests with 404 on /wasm/uutils.wasm.
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).
The website workflow built all four WASM modules (uutils, grep, find,
diffutils) serially in a single job. Split them so they compile in
parallel: coreutils keeps its own job (it needs the l10n copy, locales.js
and feat_wasm command parsing), while grep/find/diffutils share one matrix
job (grep/find pull in onig_sys and need a WASI sysroot; diffutils is pure
Rust). Each leg uploads its .wasm plus numbered command/version fragments
that the build job stitches into commands.js / version.js; SITE_VERSION is
generated there since it describes the site repo. Add Swatinem/rust-cache
to every build to speed up warm runs.
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).
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.
The playground version line records the coreutils WASM commit and the
site commit, but grep (built as its own standalone WASM module) had no
provenance shown. Capture grep's commit/short/date in the workflow and
append a UUTILS_GREP_VERSION block to version.js, then render it next to
"Built from uutils/coreutils ..." as "grep <short> (<date>)" linking to
the uutils/grep commit.
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.
Alongside the coreutils WASM commit, record the website repo's
commit/date in version.js (SITE_VERSION) and display it next to
the existing build info on the playground.
`true` and `false` ship in the WASM binary, but are not a useful demonstration because they produce no output and there is no facility to check exit code in the playground.
`yes` ships in the WASM binary but its infinite output just spams the
terminal, so filter it out of the generated WASM_COMMANDS list. Done
in the workflow so a single regex covers both autocomplete/help (via
AVAILABLE_COMMANDS) and the rendered prose section.
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.
The heredoc body for version.js was at column 0 while the surrounding
run block is indented 10 spaces, causing YAML to terminate the block
scalar and fail with 'Invalid workflow file' at line 146. Replace the
heredoc with a grouped echo block that respects the block indentation.
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.
mdbook 0.5's built-in Font Awesome parser sees the legacy `fa` class
that uudoc emits and defaults to type=regular, failing to find
linux/windows/apple (which live under `brands`) and spamming hundreds
of WARN lines per build. Drop the `fa ` prefix between uudoc and
mdbook build for both English and translated docs.
- 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