in ,

samuela / rustybox, Hacker News

samuela / rustybox, Hacker News


                    

        

RustyBox is a free-range, non-GMO fork ofBusyBoxwritten entirely inRust. It includes all your favorite commands likels,mount, andtop, 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

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 someextern "C"includes with more idiomaticuses. Pretty straightforward find / replace-all usually does the trick.
  • Pick a utility, likecatortouch, and work on translating it into safer, more idiomatic rust. There are plenty ofunsafes 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 popularalpineDocker image.

And of course please test out rustybox and reportany and allissues, concerns, and comments!

Customizing your rustybox distribution

Chances are you don’t actually need or wanteverythingin rustybox. By design, the default distribution includes a relatively conservative set of utilities and it’s expected that you customize your build of rustybox for your specific use-case. If you’d like to build rustybox with the default utilities and some extras,

cargo build --release - -features "mkfs_vfat"

If you’d like to build rustybox with only a specific set of utilities (no defaults included),

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

Check out the[features]section ofCargo .tomlfor the full list of utilities on tap.

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

Acknowledgments

There’s simply no way this project would be possible without the hard work from the wonderfulbusyboxandc2rustteams. Both projects are dope, and you should check them out.

  

Brave Browser
Read More
Payeer

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Pokemon 'Rip-Off' DokeV Looks Better Than Actual Pokemon, Crypto Coins News

Pokemon 'Rip-Off' DokeV Looks Better Than Actual Pokemon, Crypto Coins News

Another company is dialing back expectations for self-driving taxis, Ars Technica

Another company is dialing back expectations for self-driving taxis, Ars Technica