3 ms·
I'm still kind of surprised that Linus ended up allowing Rust into the kernel. Good, but surprising. Looking forward to this release once it hits NixOS Unstab
by tombert 1y ago
I'm still kind of surprised that Linus ended up allowing Rust into the kernel. Good, but surprising.
Looking forward to this release once it hits NixOS Unstable.
- xeonmc 1y agoA surprise, to be sure, but a welcome one.
- Alupis 1y agoMy understanding is its contained to the "edges", mostly in drivers and not in the "core" kernel. Still interesting indeed.
- preisschild 1y agofor now, due to gcc-rs not being completed yet and the rustc compiler not supporting every linux architecture
- dralley 1y agoThere's two gcc-based compilers for Rust, gcc-rs which is part of the gcc suite and written in C++, and rustc_codegen_gcc, which is an optional backend for the existing Rust compiler written in Rust which emits an intermediate representation that GCC can understand. rustc_codegen_gcc is much closer to completion.
- lights0123 1y agoIt surprised me that Linux 6.12's QR code generator is written in Rust and enabled in at least Arch and Fedora.
- jeffbee 1y agoWhy does the kernel need a QR code generator?
- lights0123 1y agohttps://www.phoronix.com/news/Linux-6.12-DRM-Panic-QR-Code https://www.phoronix.com/news/Linux-6.12-DRM-Panic-QR-Code
- infogulch 1y agoOh that's pretty nifty. It's always been a pita to get data (logs, traces, metadata etc) off of a crashed system. This is less human readable, but any human that wants to read it will want the raw data anyway. Way easier to do this than try to run photos of a screen through OCR.
- deleted 1y ago[deleted]
- Twirrim 1y agoA QR code can capture 3k of data, you can capture a lot of context and details in that, particularly if you apply a little bit of compression (and the kernel has compression algorithms embedded in it). More than can be captured on a screen normally, without it zooming out of sight.
- jeffbee 1y agoAn 80x25 ascii display carries 2000 characters which isn't shabby. But yeah, a lot harder to photograph.
- 6SixTy 1y agoWould most people rather have a cell phone picture of the screen for debug logs, or a QR code that has those logs ready to be scanned and copy/pasted?
- geodel 1y agoOn that note seems like after ruckus about Hector Martin's PRs not getting merged, things are calm but progressing.
- dralley 1y agoLinus is pragmatic. His only hard rule is "don't break userspace", most everything else is contingent. From what I can tell, he views Rust for Linux as a social project as much as a technical one - attract new (and younger) developers into the kernel, which has become pretty "senior", force all of the "unwritten rules" to be written down, and break down some of the knowledge siloing and fiefdom behavior that has taken place over the years (by sharing it specifically with that younger group of developers). If you think about it, Rust for Linux is in some ways essentially an auditing committee reviewing all of the API interactions between kernel subsystems and forcing them to be properly defined and documented. Even if the Rust part were to fail (exceedingly unlikely at this point), it's a useful endeavour in those other respects. But of course, if Rust is successful at encoding all of those rules using the type system, that unlocks a lot of value in the kernel too. Most of the kernel code is in drivers, and it's typically written by less experienced kernel developers while being harder to review by maintainers that don't have background on or access to the hardware. So if you can get drivers written in Rust with APIs that are harder to misuse, that takes a big load off the maintainers.
- tombert 1y agoI just remember how much shit he talked about C++, and I guess I assumed that that would carry over to Rust as well.
- kstrauser 1y agoTrue, but the Rust language itself is tiny compared to C++. There are only a slim fraction of the edge cases to learn. Note that I'm not saying Rust is easy to learn. I found it to be so, but it's going to be different for everyone. I do firmly believe that it's far easier for the average dev to learn the core of Rust than the core of C++, with far fewer footguns along that path.
- tombert 1y agoOh I don't disagree with any of that, I like Rust. I was just surprised is all.
- marsven_422 1y ago[dead]
- knowitnone2 1y agoIt's an experiment. If it goes well, great. If it doesn't, revert back. What's the harm?