Live data from Hacker News

Show HN: RustyBox – a Busybox fork written in Rust

github.com

1–10 of 56 posts

Re: Show HN: RustyBox – a Busybox fork written in Rust

#2
Seems to consist mostly of a copy of Busybox’s C code auto-translated to Rust using c2rust – resulting in ubiquitous use of raw pointers and `unsafe` for mundane operations. That’s technically “written entirely in Rust”, but not in the way you’d expect… On the other hand, it could serve as a good starting point for a gradual rewrite into idiomatic Rust.

Re: Show HN: RustyBox – a Busybox fork written in Rust

#4
Is C2R (and the precursor I know of F2C) strictly speaking "without a line of C" in it?

Yes, literally. But figuratively, No, because you used the C as a higher order definition language and did translation not re-implementation.

So this might (in some cases) be bug for bug compatible (a good thing?) if the bug is a logic bug, not a C boundary error or a type cast effect or something not strictly defined. It isn't an "independently implemented suite" if you wanted to e.g. use it for conformance testing to a spec.

Re: Show HN: RustyBox – a Busybox fork written in Rust

#6
post #2

Seems to consist mostly of a copy of Busybox’s C code auto-translated to Rust using c2rust – resulting in ubiquitous use of raw pointers and `unsafe` for mundane operations. That’s technically “written entirely in Rust”, but not in the way you’d expect… On the other hand, it could serve as a good starting point for a gradual rewrite into idiomatic Rust.

Two of the bullet points they list ask for help in doing this conversion:

* 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!

Re: Show HN: RustyBox – a Busybox fork written in Rust

#10
I've always been interested in busybox and other similar tool sets - I even wrote a very simple set of coreutils clones at one point; but I've never really understood the use case. I like Rust & I like using modern tools when there's a benefit. But whatever coreutils Apple ship or come with a reasonable Linux distro seem to work 99% of the time for my work. Simpler & smaller I get for restricted embedded, I'm sure I've used them doing embedded work with small ARM boards & a custom tiny Linux - but the payoffs have never seemed too enticing.
Post reply on HN