Live data from Hacker News

The Case for Rust in the base system

mail-archive.freebsd.org

131–140 of 155 posts

Re: The Case for Rust in the base system

#131
post #19

To strongman the "anti" case: I believe that FreeBSD still nominally supports a number of architectures that have immature or no Rust support, which seems like a major blocker to (at least) rewriting major system components like devd in Rust. And build times are already a problem -- the joke five years ago was that the FreeBSD build was a wart on the side of Clang. Doubling that isn't ideal. That said, I'm a big Rust…

Honestly, after being in the software industry for a couple of decades and seeing how many times folks attempt to reinvent the wheel (for commercial or other reasons), I am beginning to sigh when I see how many language zealots there are (not you, just in general). The reality is, Rust does not need to replace everything. Nor should it be held on some kind of pedestal. E.G. Curiosity rover is doing just fine running…

I doubt many C devs would be doing fine coding under the same level of quality expected by NASA / JPL programming standards and security validation.

Re: The Case for Rust in the base system

#132
post #115

Earlier quoted context omitted.

The Curiosity rover might be doing ok, but the many places that have my social security number are not. I care more about the latter than the former.

the many places that have my social security number So COBOL everywhere it is. Let it be written, let it be done.

Actually it isn't susceptible to C's security flaws, and is a compiled language, with relatively good performance. :)

Re: The Case for Rust in the base system

#133

Earlier quoted context omitted.

Darwin isn't going to do Rust. Apple's plan is that Swift can be made to do everything necessary for their operating system. Since Apple are bad at doing more than one thing, they've settled on the idea of a single successor language, chosen under advice but by senior management. So, Swift. Unless it proves impossible to use Swift (and I doubt it) that's what they'll do. For everything above the line, Swift is defini…

Apple is juggling Swift and bounds-checked C together just fine last I checked.

Apple's John McCall makes a picture of where they are going with Swift in

"Introducing a Memory-Safe Successor Language in Large C++ Code Bases"

https://www.youtube.com/watch?v=lgivCGdmFrw

Re: The Case for Rust in the base system

#134

Earlier quoted context omitted.

Darwin isn't going to do Rust. Apple's plan is that Swift can be made to do everything necessary for their operating system. Since Apple are bad at doing more than one thing, they've settled on the idea of a single successor language, chosen under advice but by senior management. So, Swift. Unless it proves impossible to use Swift (and I doubt it) that's what they'll do. For everything above the line, Swift is defini…

> Since Apple are bad at doing more than one thing, they've settled on the idea of a single successor language, chosen under advice but by senior management. So, Swift. Apple has been using Rust for years, and I'm not aware of any decisions to move away from that, though given how secretive they are, I guess that could be a possibility. > So yes, Rust for NT is very possible. Rust is already being shipped (in preview…

Apple's John McCall makes a picture of where they are going with Swift in

"Introducing a Memory-Safe Successor Language in Large C++ Code Bases"

https://www.youtube.com/watch?v=lgivCGdmFrw

Re: The Case for Rust in the base system

#135

Earlier quoted context omitted.

No, I meant FreeBSD, though NetBSD is (much) further on the same spectrum. If I read that Darwin or NT were looking at using Rust, I'd figure that was easy enough; they more or less only target x86 and ARM, which are mostly well-covered by Rust. If NetBSD said they were moving to Rust... I dunno, I'd assume that either Rust had really changed their approach to platform support, or that NetBSD as I knew it had ceased…

Darwin isn't going to do Rust. Apple's plan is that Swift can be made to do everything necessary for their operating system. Since Apple are bad at doing more than one thing, they've settled on the idea of a single successor language, chosen under advice but by senior management. So, Swift. Unless it proves impossible to use Swift (and I doubt it) that's what they'll do. For everything above the line, Swift is defini…

On what concerns XBox there is little Rust love on Microsoft's side they are all about C++ and COM, and even on Windows, there are only some little experiements ongoing like the GDI regions rewrite that in now on Windows 11.

It remains to be seen if Rust/WinRT will ever take off, given the mess that the same team has done with C++/WinRT, now in maintenance.

.NET based GUI frameworks seem to have won to that front, no wonder given how bad the C++/WinRT experience end up being, and Rust/WinRT is years away to achieve parity with C++/WinRT, let alone what .NET GUI frameworks can offer today in ecosystem, and GUI components.

Where Microsoft is going big on Rust, is Azure, where Rust is now the official systems language for new development on use cases where managed compiled languages aren't a fit.

This was announced at Prossimo's conference in memory safety systems, by David Weston, the vice president of OS security at Microsoft.

https://twitter.com/dwizzzleMSFT/status/1720134540822520268?...

Re: The Case for Rust in the base system

#136
post #96

Earlier quoted context omitted.

Right—and maybe those places ought to install OpenBSD. https://www.openbsd.org/ Rust is not immune to security vulnerabilities. And at the end of the day, social engineering will steal more data than "hacking the mainframe". Why break in when you can just ask to be let in? OpenBSD has a great security track record because they resist excessive change and prefer simplicity . For those who want to add Rust to the core…

Not solving all security issues isn't the same as not solving security issues. I'd rather my financial data be handled by software written in something that solves many whole classes of vulnerabilities than something that solves none of them.

Apart from the fact that it doesn't only solve a lot of security vulnerabilities, but also avoids a lot of bugs, by virtue of having a stricter type system and memory safety.

Re: The Case for Rust in the base system

#138
post #5

Very naive question. What's the main selling point of Rust besides being stably sponsored by Mozilla?

One of the biggest things about Rust for me is that it's essentially Prometheus, bringing the fire of modern languages and more advances PL theory to systems programming, which imo is sorely needed. We don't need a 10% better C or C++, we need a huge jump for the field. Rust I think does this. They have: 1. A type system that's deeply inspired by OCaml, a language that's designed and used by a lot of programming lang…

My point here wasn't to say that Rust is as good or powerful as the advanced pure functional languages like Haskell and Ocaml and Idris, but that it's starting the process of properly bringing their power and features to the systems programming world, which I think is what's important.

Re: The Case for Rust in the base system

#139

Earlier quoted context omitted.

The Curiosity rover might be doing ok, but the many places that have my social security number are not. I care more about the latter than the former.

Right—and maybe those places ought to install OpenBSD. https://www.openbsd.org/ Rust is not immune to security vulnerabilities. And at the end of the day, social engineering will steal more data than "hacking the mainframe". Why break in when you can just ask to be let in? OpenBSD has a great security track record because they resist excessive change and prefer simplicity . For those who want to add Rust to the core…

It seems like this isn’t actionable for me - I don’t have much sway over people’s choice of install. Given this, I think my best course of action are to push for regulation, or for standards bodies to accelerate the transition to memory safe languages.

I don’t think it was your intention, but what you just said makes me want to applaud more heavy-handed efforts to make the switch away from C/C++.

Re: The Case for Rust in the base system

#140
post #96

Earlier quoted context omitted.

Right—and maybe those places ought to install OpenBSD. https://www.openbsd.org/ Rust is not immune to security vulnerabilities. And at the end of the day, social engineering will steal more data than "hacking the mainframe". Why break in when you can just ask to be let in? OpenBSD has a great security track record because they resist excessive change and prefer simplicity . For those who want to add Rust to the core…

Not solving all security issues isn't the same as not solving security issues. I'd rather my financial data be handled by software written in something that solves many whole classes of vulnerabilities than something that solves none of them.

Remember we are talking about putting it into the core OS and overall what will the impact be on the stability of said OS. What folks here tend to describe is userspace applications which languages like Go/Java/C#/Erlang/Etc... already solve. In fact, most banks probably already use safer languages for the bulk of the workloads and it works just fine.

I want to point out one more thing: Rust is not a simple language by any stretch. It's equal to in complexity to C++ (yet without decades of established "good practices"). It is much preferable to have an easier to understand core and move the complexity outward—for improved stability and robustness. The core OS by nature of what it does needs to access raw resources in an "unsafe" manner. Rust kernel code will be littered with unsafe blocks and unnecessary complexity.

Post reply on HN