Commit Graph
79 Commits
Author SHA1 Message Date
Sylvestre Ledru d01f449a6a ci: align upload-artifact to v8 to match download-artifact@v8
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.
2026-06-21 09:22:18 +02:00
Sylvestre Ledru e37fbb8c79 playground: ship uutils sed
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).
2026-06-20 19:40:09 +02:00
renovate[bot] e48b463ddf chore(deps): update github artifact actions to v8 2026-06-20 17:59:41 +02:00
Sylvestre Ledru 53d729a859 ci: build the WASM modules in parallel jobs
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.
2026-06-20 17:39:19 +02:00
renovate[bot] 29bf7d57f6 chore(deps): update actions/checkout action to v7 2026-06-20 16:28:07 +02:00
Sylvestre Ledru 20a37bced4 playground: ship uutils diffutils (diff, cmp)
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).
2026-06-20 16:04:26 +02:00
renovate[bot] 615c5ea80d chore(deps): update actions/checkout action to v7 2026-06-19 08:19:24 +02:00
Sylvestre Ledru 81f75aeb0c playground: ship uutils findutils (find) alongside grep
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.
2026-06-15 20:32:12 +02:00
Sylvestre Ledru ea9dcebef6 playground: show the grep build commit and date
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.
2026-06-02 16:41:03 +02:00
Sylvestre Ledru 77efde6da3 Add uutils grep to the playground
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.
2026-06-02 13:47:45 +02:00
Sylvestre Ledru 98c6ab23b1 Merge pull request #51 from xtqqczze/patch-1
Hide `true` and `false` from the playground command list
2026-05-29 11:23:45 +02:00
Sylvestre Ledru c037b4553e Show uutils.github.io build commit on the playground page
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.
2026-05-29 10:58:06 +02:00
xtqqczze f25d426b95 Hide true and false from the playground command list
`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.
2026-05-24 02:25:20 +01:00
Sylvestre Ledru c8e78040fe Hide yes from the playground command list
`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.
2026-05-13 08:45:22 +02:00
Sylvestre Ledru c5907a4b59 Generate playground command list from coreutils feat_wasm
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.
2026-05-13 08:13:39 +02:00
renovate[bot] 7ef8b73d84 Update actions/upload-pages-artifact action to v5 2026-04-14 07:11:38 +02:00
Sylvestre Ledru 7131cf384a Fix YAML indentation in website workflow heredoc
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.
2026-04-13 09:17:26 +02:00
Sylvestre Ledru d843e3d2c2 Show uutils commit hash and date on playground page
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.
2026-04-13 09:02:41 +02:00
Sylvestre Ledru e64308bb0b Strip legacy FA4 class from uudoc-generated platform icons
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.
2026-04-04 23:16:11 +02:00
Sylvestre Ledru c7f75bfccb Merge pull request #45 from uutils/renovate/shalzz-zola-deploy-action-0.x
Update shalzz/zola-deploy-action action to v0.22.1
2026-04-04 22:56:41 +02:00
renovate[bot] 51dffbc8a8 Update shalzz/zola-deploy-action action to v0.22.1 2026-04-04 20:23:51 +00:00
Sylvestre Ledru e7c117a617 CI: generate available locales list during WASM build 2026-04-04 11:11:33 +02:00
Sylvestre Ledru adc6d38c5a Add playground tests and CI integration
- 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
2026-04-03 21:47:38 +02:00
renovate[bot] 7dedc38e11 Update actions/checkout action to v6 2026-03-27 10:43:38 +01:00
renovate[bot] ee7de7abdd Update actions/upload-artifact action to v7 2026-03-27 10:42:34 +01:00