Live data from Hacker News

Show HN: RustyBox – a Busybox fork written in Rust

github.com

11–20 of 56 posts

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

#11
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.

[deleted]

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

#13
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.

Rust is going to take credibility hits if more people do this. Once it becomes socially acceptable to use unsafe all over the place in the community, it might be hard to win the user trust back.

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

#16
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.

Almost seems like it would be easier to just write it from scratch in idiomatic Rust than to try and refactor a code base of this size that makes such extensive use of unsafe blocks and pointers.

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

#17

What is this used for? I am interested in contributing

Out of curiosity, how does one become interested in contributing to a thing when one doesn't even know what the thing is?

The name has pointers to english-as-a-second-language. It could be they were seeking "what are you using this for" or "what are you targetting with this work" which goes to the higher purpose. General use of busybox is implied by what you know of /rescue and/or the small unix for containers work, but there are also tiny unixes for small computer systems, Pi based embedded systems, IoT, you name it (busybox is probably overkill for IoT devices but I could believe its part of the diagnostic)

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

#19
post #9

If this started with BusyBox translated from C to Rust, is this code also under the GPL, as is BusyBox? I don't see any LICENSE or COPYING files in the repo.

Seems like it would have to be the same license as BusyBox, since it is a "compiled" artifact of BusyBox (just compiled to another high level language).

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

#20
post #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'…

Busybox is quite literally “POSIX in a box”. It’s useful to have on systems where you’d like a shell and some utilities but don’t want to bother with having anything fancy.
Post reply on HN