• Stars
    star
    792
  • Rank 57,492 (Top 2 %)
  • Language
    Rust
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A free-range, non-GMO fork of busybox in 100% Rust ๐Ÿฆ€

rustybox

RustyBox is a free-range, non-GMO fork of BusyBox written entirely in Rust. It includes all your favorite commands like ls, mount, and top, but without a single line of C code! Like BusyBox, rustybox weighs in at just under 1 megabyte and includes all the basic utilities you need to set up a small Linux OS.

screenshot

Status

rustybox is a work-in-progress! It started out life as a direct c2rust transpile of the busybox project, and has been steadily improving since then. This has the benefit of ensuring that rustybox is "bug-for-bug" compatible with busybox, but it does mean that we have inherited the raw pointers and unsafes that come from C land. If making essential software memory-safe is your cup of tea then join the party with a PR!

Contributing to rustybox

Contributing to rustybox is a great way to get started with rust, dig into the bowels of linux, or to help to free the world from the diabolical tyranny of C.

There's lots to be done, so we're happy to have you! Here are just a few ideas:

  • Replace some extern "C" includes with more idiomatic uses. Pretty straightforward find/replace-all usually does the trick.
  • Pick a utility, like cat or touch, and work on translating it into safer, more idiomatic rust. There are plenty of unsafes lying around that you can tackle!
  • Try building Alpine linux with rustybox in place of busybox. This could be an awesome drop-in replacement for the popular alpine Docker image.

Check out the contributing doc for more info!

And of course please test out rustybox and report any and all issues, concerns, and comments!

Building rustybox

Rustybox requires a Linux system to build. Developing in Docker works just as well on macOS and Windows. You'll need GCC and its development headers (esp. quadmath.h) in order to build the f128 dependency. Running sudo apt install build-essential should do the trick on Ubuntu/Debian.

Please open an issue if you have trouble building!

Customizing your rustybox distribution

By default, rustybox does not include any utility. You can include all of them:

cargo build --all-features

Chances are you don't actually need or want everything in rustybox, especially for a release. If you'd like to build rustybox with only a specific set of utilities:

cargo build --release --features "cat ls which"

Check out the [features] section of Cargo.toml for the full list of utilities on tap.

After building, you can remove unnecessary debug sections with strip. This is recommended if you are particularly size-conscious.

Acknowledgements

There's simply no way this project would be possible without the hard work from the wonderful busybox and c2rust teams. Both projects are dope, and you should check them out. Much of the code you find in this repo is transpiled from the work of the busybox AUTHORS.

More Repositories

1

git-re-basin

Code release for "Git Re-Basin: Merging Models modulo Permutation Symmetries"
Python
465
star
2

nixos-up

The fastest NixOS install there is! ๐ŸŽ๏ธ๐Ÿ
Python
211
star
3

torch2jax

Run PyTorch in JAX. ๐Ÿค
Python
157
star
4

bidirectional-typing

A bidirectional type checker
Haskell
52
star
5

remod

chmod for human beings! ๐Ÿ’ซ
JavaScript
30
star
6

nixpkgs-upkeep

Auto-updates and CI ๐Ÿค– for Nixpkgs
Python
27
star
7

oi-vae

Code for "oi-VAE: Output Interpretable VAEs for Nonlinear Group Factor Analysis"
Python
26
star
8

kindling

A Swiss Army knife for building dope stuff with pytorch.
Python
8
star
9

ctpg

Code for the paper "Faster Policy Learning with Continuous-Time Gradients"
Julia
6
star
10

taco_backend

Ruby
5
star
11

e-stops

Source code for "Moโ€ฒ States Moโ€ฒ Problems: Emergency Stop Mechanisms from Observation"
Python
4
star
12

cuda-nix-testsuite

Python
4
star
13

Bruno

Java
4
star
14

bitbop

Run `ssh bitbop.io`, get a GPU dev machine! ๐Ÿค–
TypeScript
4
star
15

research

Python
2
star
16

language-pyret

Pyret support in Atom.
2
star
17

faceback

Code for "Disentangled VAE Representations for Multi-Aspect and Missing Data"
Python
2
star
18

nixos-idle-shutdown

Auto-shutdown NixOS after a period of inactivity
Python
1
star
19

grpc-polyglot

Example client/server gRPC implementations in many languages
JavaScript
1
star
20

phonetelepathy

An Android app that can send and receive arbitrary data over audio. Features amplitude and clock skew correction.
Java
1
star
21

pyDPMP

The Diverse Particle Max-Product algorithm and friends
Python
1
star