94 Commits
Author SHA1 Message Date
Sylvestre Ledru 2be5d8c0bd playground: fix the coreutils command list
Upstream coreutils changed `feat_wasm` from an explicit list of utilities
to `feat_wasm = ["feat_common_core", "nproc"]`. The workflow scraped that
list with a sed range, which cannot resolve feature groups and, now that
feat_wasm is a one-liner, ran on to the next `]` and swallowed the body of
feat_os_unix. The deployed commands.js ended up as

  const WASM_COMMANDS = ["feat_Tier1","feat_common_core","feat_os_unix",
    "feat_require_unix","feat_require_unix_utmpx","nproc","grep",...];

and since executeCommandLine() gates dispatch on that array, every
coreutils command answered "command not found" in the playground without
ever reaching the WASM binary, which was fine all along.

Replace the scrape with scripts/wasm-command-list.py, which resolves the
feature through the [features] table down to the leaf optional
dependencies (the utility crates), drops `dep:`/`crate/feat` entries,
strips the `uu_` prefix (uu_test -> test) and fails loudly if the feature
resolves to no utilities.

The unit tests stayed green through all of this because the test page only
loaded wasm-terminal.js and therefore always exercised FALLBACK_COMMANDS,
never the generated file. Load /wasm/commands.js there too and assert that
the core utilities are present and that no feature group leaks in; against
the currently deployed commands.js that now fails 72 of 185 tests instead
of passing. Also refresh FALLBACK_COMMANDS with the utilities feat_wasm
gained (hostid, mktemp, nice, test, tty).
2026-09-17 10:42:56 +02:00
renovate[bot] 20af1b1410 Update shalzz/zola-deploy-action action to v0.23.6 2026-09-13 12:28:15 +02:00
Sylvestre Ledru 9e4ca7cabb website: build the wasm playground with feat_diagnostics
feat_diagnostics only comes in through coreutils' default feature set, and
the playground binary is built with --no-default-features, so uucore
compiled diagnostics_stub.rs: enabled() was a hardcoded false and every
utility printed the plain one-line error. `expr 9 + foo` in the playground
showed no caret at all.

browser_wasi_shim reports stderr as a character device with FD_WRITE and
neither FD_SEEK nor FD_TELL, which is what Rust's WASI is_terminal() takes
for a tty, so the reports render once the feature is on.
2026-08-31 00:40:01 +02:00
renovate[bot] 5bc10f59b1 Update shalzz/zola-deploy-action action to v0.23.4 2026-08-21 11:24:01 +02:00
renovate[bot] d903fd4d61 Update shalzz/zola-deploy-action action to v0.23.3 2026-08-12 12:23:21 +02:00
renovate[bot] b8f2174dba Update shalzz/zola-deploy-action action to v0.23.2 2026-08-10 15:13:51 +02:00
Sylvestre Ledru 7ee0038bad install wasi-sdk to be able to build expr 2026-08-08 00:18:34 +02:00
renovate[bot] c682ffbd8d Update shalzz/zola-deploy-action action to v0.23.1 2026-08-06 08:34:48 +02:00
renovate[bot] 15e19e27ca Update actions/setup-node action to v7 2026-07-14 09:13:48 +02:00
Sylvestre Ledru 7ef184e586 Merge pull request #59 from uutils/renovate/actions-setup-node-6.x
Update actions/setup-node action to v6
2026-06-27 16:40:36 +02:00
renovate[bot] 5a0efce0d7 Update dependency node to v24 2026-06-27 14:27:07 +00:00
renovate[bot] 456c5c4a51 Update actions/setup-node action to v6 2026-06-27 14:27:03 +00:00
Sylvestre Ledru 19ef4a964c ci: run eslint on the playground JavaScript
Adds a lint-js job that installs the eslint devDependency and runs
"npm run lint" on static/js.
2026-06-27 16:21:32 +02:00
Sylvestre Ledru e3ffd3b37b playground: ship findutils locate and updatedb in WASM
Build the locate and updatedb binaries from uutils/findutils alongside
find and advertise them in the playground. The standalone WASM matrix now
takes a list of bins per module, emitting one .wasm per binary.

xargs is intentionally omitted: it must spawn child processes, which the
browser WASI sandbox does not support.
2026-06-22 08:11:26 +02:00
Sylvestre Ledru a227501229 ci: fix upload-artifact version (v8 does not exist, use v7) 2026-06-21 19:24:30 +02:00
Sylvestre Ledru 15a745ee50 bump upload-artifcat 2026-06-21 09:44:10 +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