From 604191d5c8c778739e3454073c825840099614d9 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 4 Apr 2026 13:00:11 +0200 Subject: [PATCH] Add blog post: Try uutils Coreutils directly in your browser --- .../blog/2025-04-playground-how-it-works.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 content/blog/2025-04-playground-how-it-works.md diff --git a/content/blog/2025-04-playground-how-it-works.md b/content/blog/2025-04-playground-how-it-works.md new file mode 100644 index 000000000..ae2bf2841 --- /dev/null +++ b/content/blog/2025-04-playground-how-it-works.md @@ -0,0 +1,22 @@ ++++ +title = "Try uutils Coreutils directly in your browser" +date = 2025-04-04 +page_template = "post.html" +authors = ["Sylvestre Ledru"] ++++ + +We are excited to announce the [uutils playground](/playground) — an interactive terminal that lets you run real Rust coreutils directly in your browser, with no installation, no server, and no network round-trips after the initial page load. + +Just open the page and start typing commands like `ls`, `sort`, `cat`, `head`, `factor`, or any of the 60+ utilities available. You can pipe commands together (`sort fruits.txt | uniq -c | sort -rn`), use redirections (`echo hello > file.txt`, `cat < file.txt`), explore the virtual filesystem, and even switch between 30+ languages using the locale dropdown. + +### How it works + +The uutils coreutils are compiled to WebAssembly (targeting `wasm32-wasip1`) as a single multicall binary — similar to BusyBox. When you type a command, a minimal JavaScript shell parses your input, sets up pipes between stages, and executes each one by instantiating the WASM binary with the right arguments. A virtual in-memory filesystem backed by [browser_wasi_shim](https://github.com/bjorn3/browser_wasi_shim) provides file I/O. Everything runs client-side — once loaded, the playground works entirely offline. + +An important distinction worth noting: **coreutils only provides individual commands** (`sort`, `cat`, `ls`, etc.). Features like `if`/`then`/`else`, `while` loops, variable expansion (`$VAR`), and globbing (`*.txt`) are shell features provided by Bash, Zsh, or similar — not by coreutils. The playground's JavaScript shell is intentionally minimal, keeping the focus on the coreutils themselves. + +For a deeper look at the architecture — including diagrams, the multicall dispatch mechanism, the `feat_wasm` feature gate, and how localization is handled — check out the [full technical deep-dive](/playground-how-it-works). + +### Try it, break it, improve it + +Give the [playground](/playground) a spin and let us know what you think! Contributions are welcome — whether it is improving WASI compatibility to enable more commands, adding translations via [Weblate](https://hosted.weblate.org/projects/rust-coreutils/), or enhancing the playground shell itself.