- Rust 97.3%
- Shell 1.6%
- HTML 0.9%
- Python 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .cargo | ||
| .github | ||
| .vscode | ||
| applets | ||
| archival | ||
| console_tools | ||
| coreutils | ||
| crates/rustybox-core | ||
| debianutils | ||
| docker | ||
| docs | ||
| e2fsprogs | ||
| editors | ||
| findutils | ||
| init | ||
| klibc_utils | ||
| libbb | ||
| libpwdgrp | ||
| librb | ||
| loginutils | ||
| mailutils | ||
| miscutils | ||
| modern | ||
| modutils | ||
| networking | ||
| printutils | ||
| procps | ||
| runit | ||
| scripts | ||
| shell | ||
| site | ||
| sysklogd | ||
| tests | ||
| testsuite | ||
| usage | ||
| util_linux | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| compat.rs | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| MIGRATION.md | ||
| modern.rs | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
| rustybox.rs | ||
| SPONSORS.md | ||
rustybox
Built in the open — ♥ sponsor the resurrection.
RustyBox is a free-range, non-GMO fork of BusyBox written entirely in Rust. It serves as the official userland for kernel8 and vakedkernel 🜂, as well as the embedded Linux sandbox for Entheai. It includes all your favorite commands like ls, mount, grep, find, and top, but without a single line of C code. Like BusyBox, it covers the basic utilities you need to stand up a small Linux userland or agent sandbox, and fits into a single, fully-static ~4MB binary (UPX compressed).
Status
Resurrected (2026-07). rustybox started as a direct c2rust transpile of BusyBox and then sat untouched from 2020, when it stopped compiling on any modern Rust (llvm_asm!, removed nightly features, an ancient libc). It now builds, links, and runs again:
- Compiles with a current nightly (pinned in
rust-toolchain.toml), edition 2021. - All applets compile (
cargo build --all-features). - Fully-static musl binaries for both x86_64 and aarch64 — the same source is portable across
glibc/musland both architectures. - Supply-chain secured — Release binaries are statically compiled with the fast
wildlinker, heavily compressed with UPX (to ~4.0 MB), and accompanied by cryptographically signed source code provenance archives viacosign. libcbumped from the 2019-era0.2.65to current.
It is still "bug-for-bug compatible" with BusyBox in the sense that the internals are the transpiled C: raw pointers and unsafe abound. Making it idiomatic and memory-safe — applet by applet — is the ongoing work (see MIGRATION.md).
Building
rustybox is Linux-only (raw syscalls, Linux headers). On macOS/Windows, build in the provided container — it works identically everywhere.
# one-time: build the Linux build image
docker build -t rustybox-build:latest -f docker/Dockerfile .
# build everything / a curated core / run the tests
docker/build.sh --all-features
docker/build.sh # curated-core feature set
docker/build.sh test
Features only gate the applet dispatch table (applets/applet_tables.rs), not module compilation — the whole tree always compiles. Pick the applets you want in the final binary:
cargo build --release --features "cat ls which"
Static, dual-architecture binaries
The musl targets produce the fully-static, embeddable binaries. They link with rust-lld, so you can cross-build any arch from any host (no per-arch cross-cc):
cargo build --release --target x86_64-unknown-linux-musl --all-features
cargo build --release --target aarch64-unknown-linux-musl --all-features
strip the result if you are size-conscious; a curated core lands well under a megabyte.
Release Build Pipeline
Official release binaries go through a rigorous, supply-chain secured pipeline before being uploaded to GitHub:
- Provenance: The exact source code tree is archived (
git archive) and keylessly signed using Sigstore'scosign(OIDC). Both the source.tar.gzand.sigare attached to the release. - Compilation: Built natively using the blazingly fast
wildlinker forx86_64andaarch64. - Compression: The resulting static binaries (~16 MB) are packed using
upx --best --lzmadown to ~4.0 MB, retaining all debug symbols within the compressed payload. - Slim Build (
*-slim): We also produce a stripped, ultra-compressed-slimrelease variant for each architecture where debug symbols are discarded entirely before UPX compression, resulting in an even smaller ~3.2 MB binary.
Roadmap
- Idiomatic core — replace the transpiled
unsafeinternals of the common applets with safe Rust (includinginit,ifconfig, andashjob-control), and trim the inherited warning pile. - Modern equivalents — where a best-in-class Rust CLI already exists (
ripgrep,bat,fd,eza,uutils…), offer it as a drop-in behind the familiar applet name. See MIGRATION.md. - Help Us Port Legacy Applets — We are actively looking for robust, permissively licensed Rust library equivalents to replace the remaining transpiled GPL applets (e.g.,
awk,vi,wget). Check the interactive Applet Registry to see the migration status of all 300+ tools and help us secure the rest of the userland!
Sponsor
rustybox is built in the open — resurrecting dead code, hardening it across architectures, and making the classic Unix toolbox memory-safe. If it saves you a dependency, a container megabyte, or a timeout guard around a runaway command, consider backing the work.
→ Sponsor on GitHub
One GitHub Sponsors listing funds this alongside my other open-source work (crabcc, Vaked, …) — the tiers below are shared across all of it, with rustybox-specific perks layered on top.
| tier | / month | you get |
|---|---|---|
| 🌱 Supporter | $5 | Name in SPONSORS.md + the warm glow of funding safe systems software |
| 🔧 Contributor | $25 | Above, plus a monthly research-experiment run on the wider stack |
| 🏗️ Backer | $100 | Above, plus your name/handle in this README |
| 🚀 Sponsor | $500 | Above, plus your logo on rustybox.io |
| 🤝 Partner | $2,500 | Above, plus prominent logo placement and a say in which applets go memory-safe next |
One-time contributions welcome too. Every sponsor is credited automatically from their GitHub Sponsors tier (opt out anytime by replying to the welcome message — see SPONSORS.md).
Be the first.
Editions & licensing
rustybox ships in two editions:
rustybox(full) — the complete BusyBox-lineage toolbox (300+ applets, incl.awk,ash,vi, networking, archives). Because it descends from BusyBox (transpiled via c2rust), it is a GPL-2.0-only derivative and stays GPLv2. This is the default binary.rustybox-core(MIT) — a memory-safe multicall built entirely on permissive crates (the uutils coreutils, ripgrep's search libraries,walkdir/globset) plus rustybox's own dispatch/grep/find/archive/hash code. No BusyBox/GPL code is compiled, so this binary is distributable under MIT. Covers all 85+ memory-safe, permissive applets (coreutils family +grep/find+tar/gzip/bzip2/xz+ hashes + agent tools liketimeout/xargs/watch/flock).
cargo build -p rustybox-core --release # the MIT edition
target/release/rustybox-core grep -rn TODO . # multicall; also works via symlinks
Which to use: want maximum parity → rustybox (GPLv2). Want an MIT-licensable, dependency-clean toolbox for embedding/redistribution → rustybox-core.
Acknowledgements
None of this exists without the BusyBox and c2rust teams. Much of the code here is transpiled from the work of the BusyBox AUTHORS.