Rewriting the GNU Coreutils in Rust
Rewriting the GNU Coreutils in Rust
Posted Jun 9, 2021 7:38 UTC (Wed) by epa (subscriber, #39769)Parent article: Rewriting the GNU Coreutils in Rust
Making them faster is nice but I think the main value may be in de-crufting. If you read the coreutils source it's full of error handling and workarounds for things like an interrupted system call that has to be retried. It's a long way from the clean style of K&R's book. Any real-world C code is, of course, but for the GNU utilities the difference seems even greater, perhaps because they are more diligent about handling all possible errors on all platforms. I'd hope that with Rust and its standard library, running on a much narrower set of platforms, a lot of this defensive code isn't needed.
