Watch
2
0
Fork
You've already forked rustybox
0
mirror of https://github.com/8b-is/rustybox.git synced 2026-11-21 23:00:00 +01:00
A free-range, non-GMO fork of busybox in 100% Rust 🦀
  • Rust 97.3%
  • Shell 1.6%
  • HTML 0.9%
  • Python 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-27 03:44:45 +01:00
.cargo build: modernize toolchain, Docker Linux build env, dual-arch musl, CI 2026-07-20 11:05:48 +02:00
.github Run xargs regressions with policy-compatible CI setup 2026-10-09 15:55:12 +09:00
.vscode Add vscode settings telling RLS to use --all-features 2020-01-31 03:42:21 +00:00
applets fix: move spherepop to its alphabetical slot (restores sort invariant) 2026-07-26 05:46:16 +02:00
archival ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
console_tools ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
coreutils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
crates/rustybox-core feat: align rustybox as official userland for kernel8 (8b-is/kernel8) 2026-07-27 03:20:47 +02:00
debianutils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
docker build: modernize toolchain, Docker Linux build env, dual-arch musl, CI 2026-07-20 11:05:48 +02:00
docs docs: ash Tier 1 job-control hardening implementation plan 2026-07-21 05:50:20 +02:00
e2fsprogs ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
editors ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
findutils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
init ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
klibc_utils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
libbb feat: align rustybox as official userland for kernel8 (8b-is/kernel8) 2026-07-27 03:20:47 +02:00
libpwdgrp ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
librb chore: cut warnings 7096 -> 433; add deploy/setup guide 2026-07-20 15:34:41 +02:00
loginutils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
mailutils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
miscutils fix: give missing Linux types a proper introduction 2026-10-23 06:44:12 +09:00
modern fix(xargs): reject invalid maximum argument counts 2026-10-05 12:55:16 -04:00
modutils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
networking ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
printutils ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
procps fix: give missing Linux types a proper introduction 2026-10-23 06:44:12 +09:00
runit ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
scripts feat: add e2e CVE report pipeline and display footprint/CVE comparison on landing page 2026-07-22 20:14:35 +02:00
shell ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
site feat: align rustybox as official userland for kernel8 (8b-is/kernel8) 2026-07-27 03:20:47 +02:00
sysklogd ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
tests feat(triad): rustybox 3-AlexiAI + st AST verified triad_rustybox_zero_float_step (v0-4-1688) — Why did the First Proof benchmark invite AlexiAI to the council? Because our proofs come with free Dad Jokes and <3! <3 2026-10-27 03:44:45 +01:00
testsuite move bc test files to their own directory 2020-02-14 02:44:20 +00:00
usage extras: add smart-tree (st/tree) as the first extras applet 2026-07-26 05:30:03 +02:00
util_linux ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
.gitignore feat(sponsors): reconcile tiers with the live listing + automate crediting 2026-07-20 21:25:51 +02:00
build.rs ci: auto format codebase and setup codex analysis 2026-07-22 11:54:26 +02:00
Cargo.lock feat: port tty and hostid applets to safe Rust equivalents 2026-07-22 20:48:12 +02:00
Cargo.toml extras: add smart-tree (st/tree) as the first extras applet 2026-07-26 05:30:03 +02:00
compat.rs fix: warnings 433 -> 48 via compat shims for redeclared libc runtime fns 2026-07-20 19:08:40 +02:00
CONTRIBUTING.md add "removing unsafes" section to contributing.md 2019-11-15 17:51:46 -08:00
LICENSE feat: port tty and hostid applets to safe Rust equivalents 2026-07-22 20:48:12 +02:00
MIGRATION.md extras: add smart-tree (st/tree) as the first extras applet 2026-07-26 05:30:03 +02:00
modern.rs extras: add smart-tree (st/tree) as the first extras applet 2026-07-26 05:30:03 +02:00
README.md feat: align rustybox as official userland for kernel8 (8b-is/kernel8) 2026-07-27 03:20:47 +02:00
rust-toolchain.toml build: modernize toolchain, Docker Linux build env, dual-arch musl, CI 2026-07-20 11:05:48 +02:00
rustfmt.toml initial commit 2019-11-01 18:34:21 -07:00
rustybox.rs feat(release): 1:1 rustybox-core parity, release packaging script, CI & SIGPIPE fixes 2026-07-22 09:28:33 +02:00
SPONSORS.md refactor: update repository links and organization targets to 8b-is/rustybox 2026-07-26 06:44:04 +02:00

rustybox

Sponsor License Static kernel8 Userland vakedkernel Userland Entheai Userland site

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/musl and both architectures.
  • Supply-chain secured — Release binaries are statically compiled with the fast wild linker, heavily compressed with UPX (to ~4.0 MB), and accompanied by cryptographically signed source code provenance archives via cosign.
  • libc bumped from the 2019-era 0.2.65 to 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:

  1. Provenance: The exact source code tree is archived (git archive) and keylessly signed using Sigstore's cosign (OIDC). Both the source .tar.gz and .sig are attached to the release.
  2. Compilation: Built natively using the blazingly fast wild linker for x86_64 and aarch64.
  3. Compression: The resulting static binaries (~16 MB) are packed using upx --best --lzma down to ~4.0 MB, retaining all debug symbols within the compressed payload.
  4. Slim Build (*-slim): We also produce a stripped, ultra-compressed -slim release 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 unsafe internals of the common applets with safe Rust (including init, ifconfig, and ash job-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 like timeout/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.