by lionkor · 2w ago · 0 comments
This is why people (including me), who absolutely adore Rust, make fun of the RiiR crowd. If you think a rewrite from the ground up is the best way to approach making software safer, you've lost the plot entirely.
Let's say you rewrite your terminal emulator in Rust from C or C++; you'll first undo decades of bug fixes, compatibility decisions, quirks, etc. which you WILL have to deal with eventually. This essentially puts you back at least a decade, because these issues take users using the software to point out to you before they're fixed. The only benefit of this whole game being that you get memory safety. These teams are never the original teams, which is the source of the problem. A rewrite can only succeed if it's a result of all the learned failures and shortcomings of the original, otherwise it's bound to repeat every single mistake and add more on top.
And you don't even deliver memory safety to the users of the original this way, because people won't use the rewrite, because it's buggy, incompatible, etc.
2: Terminal emulators is that classic straw-man in this context, ages of built up cruft to handle that often produces soft-errors, but ironically the explosion of neo-terminals with GPU acceleration has still happened because in practice so much of the legacy cruft involves applications adapting to legacy-terminals, not legacy application behaviour if you base your terminal on one of the more sound options.
3: Nginx is a http server, most things apart from encryption and the OS is within the control of the applicaion itself and there's plenty of test-suites when it comes to interfacing with the world.
Do I advocate rewriting the Linux kernel(with all hardware quirks) or LibreOffice (with UI concerns)? Ofcourse not, but http servers that are exposed to the internet all the time shouldn't be vulnerable over and over again.
Nginx is after all one of the most popular servers worldwide for a bunch of years, but despite that and any "many eyeballs" theory we still have some AI plucking out these vulns. Last week there was Apache and PHP multiple times.