by sidkshatriya · 1y ago · 0 comments
The implementation of OpenBSD predates many safer systems languages but I think OpenBSD should now start moving to a checked variant of C or a safer language like Rust/OCaml/Odin/Zig/Something else.
The conversion can start with some OpenBSD user space programs. I notice a steady stream of C related security fixes in the OpenBSD changelog. Many of these could have been probably avoided if the implementation language was more “safe” by default.
I doubt that this is going to happen but I think it is fair to point out that using C does give you some additional security headaches by default.
Everyone is busy jumping up and down and bitching about reinventing the wheel in Rust but no one has even taken the time to rewrite the simplest of Unix tools in Rust.
Not to mention OpenBSD has a rule that "base builds base" and the Rust compiler is a bloated monster that would fail that most basic task.
So where is the benefit?
"The uutils project reimplements ubiquitous command line utilities in Rust. Our goal is to modernize the utils, while retaining full compatibility with the existing utilities."
It would be nice if they commit to replacing more than just Linux tools. There are numerous quirks/additions to the GNU utils that the BSDs don't want or need.
https://github.com/sharkdp/bat (Haven't used this one, but it's pretty popular)
Where is 'grep'?
https://github.com/BurntSushi/ripgrep Use this one often. It's fast af to search a directory of source code.
Where is Korn Shell?
https://fishshell.com/blog/fish-4b/ Fish is now entirely in Rust, very popular, and to be frank basically a step above bash or ksh.
Parent wasn't about rust specifically. Just something safer than C
Under development for longer than a decade and still unstable
Someone is “putting up”, just need someone to merge uutils and the OpenBSD kernel to see what it starts to look like.
Maybe this is the next part of the “put up or shut up” mantra- but we’re getting closer.
The parents irony is not lost though. C and perl are both quite dangerous in their own ways, lots of implicit assumptions; its ironic that a safety focused operating system would lean in on those languages.
Maybe catching up to 40+ years of development takes a little bit of time?
Hardware that isn’t supported by many of these “newer & safer” languages.
Zig isn't even 1.0. Odin,DasBetterC have not much uptake.
OCaml has a GC which is a non-starter for kernel, it could be used in user space sure.