Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Asahi's M1 GPU driver is the most notable example, although it is still alpha-quality and has not yet been upstreamed. https://asahilinux.org/2022/11/tales-of-the-m1-gpu/


Actually this would be a very good first candidate for a Rust module - it's a significant newly developed piece of software, so nobody can say that they "(re)wrote it in Rust" just for the heck of it, and its impact is relatively isolated (only used on Apple Silicon Macs), so if something did break, it would mostly only hurt Asahi Linux, which is currently experimental anyway.


Well it's less that they rewrote it in Rust for the heck of it and more that they wrote it in Rust for the heck of it. Seems like it's going OK for them, though.


Well no, actually they explain their reasons for doing it in the article others linked here (https://asahilinux.org/2022/11/tales-of-the-m1-gpu/, section "A new language for the Linux kernel"), and it sounds pretty convincing - if you start a basically new and very complex driver project, and if there is a language more modern than C that might help you and is officially supported by the kernel, then why not use it?


Well for one it won't be heading upstream anytime soon, so they could have really picked any language they wanted. Rust definitely wasn't a bad choice but they did actively choose it because they wanted to.


Not “for the heck of it”, it brings significant benefits compared to rawdogging it in C++.


In C++? Is there any C++ in the Linux kernel these days?


Mo. C++ is not allowed in the kernel but Rust is. I think that says a lot given that both were proposed.


I wouldn't say it's alpha quality at this point. It's running "in-production" on all Asahi Linux laptops.


...which is currently available as an alpha release. I wonder if there's a connection here ;)


I am using Asahi Linux and the GPU driver works great, it even supports OpenGL 3.1 (https://asahilinux.org/2023/06/opengl-3-1-on-asahi-linux/). Definitely not alpha, I would say it's close to a "release candidate". Many bugs got resolved, nothing much left (besides newer OpenGL and Vulkan of course, but current state is very stable): https://github.com/AsahiLinux/linux/issues/72


The Asahi team never says the project is in the "alpha" state anymore. Or you know more then me.


I only read their homepage (https://asahilinux.org/) - it says "The Asahi Linux alpha release is out!". If there was another (more stable) release available, I assume they would mention it there.


That version is majorly out of date, their website indeed does not mention how out of date it is (that said I have no idea as to whether the devs consider the latest releases stable/RC).


Right... actually, according to their latest blog post (from beginning of August), they expected to release the "Fedora Asahi remix" by end of August. Looks like that didn't quite work out, but a release (I guess they mean a RC or production release, not alpha or beta?) seems to be imminent...


If you click on that post it goes to an announcement that is more then 1.5 years old, many releases have followed since. That link simply hasn't been updated.


Yeah, I’d say Hector Martin’s got at least the most complete example of Rust code that can go into the kernel. Though he’d be far better off working alongside actual distro maintainers as he focuses on the M1 driver, rather than bandaid-fixing his distro because he can’t handle GRUB.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: