Announcement

Collapse
No announcement yet.

Asahi Linux May Pursue Writing Apple Silicon GPU Driver In Rust

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MadCatX
    replied
    Originally posted by kylew77 View Post
    I don't like to learn new things so hate Rust, but actually have a technical reason on why Rust is the wrong choice: other operating systems working on the M1 or M2. OpenBSD has a port for the Mac M1 and I think NetBSD does too. They will never accept a rust driver into their OS so why not stick to C so everybody can benefit?
    A modern Linux GPU driver will be built around Linux' DRM infrastructure. Porting this over to other OS'es will require a lot of modifications anyway. A developer porting this to another OS may perhaps benefit from porting code that went through Rust's borrow checker and is therefore much less likely to contain invalid memory access issues, race conditions etc.

    Leave a comment:


  • RejectModernity
    replied
    Originally posted by kylew77 View Post
    I don't like to learn new things so hate Rust, but actually have a technical reason on why Rust is the wrong choice: other operating systems working on the M1 or M2. OpenBSD has a port for the Mac M1 and I think NetBSD does too. They will never accept a rust driver into their OS so why not stick to C so everybody can benefit?
    "Not my problem"

    Leave a comment:


  • Quackdoc
    replied
    Originally posted by kylew77 View Post
    They will never accept a rust driver into their OS so why not stick to C so everybody can benefit?
    because we shouldn't cripple ourselves to suit the needs of others. if they want the good stuff people will contribute to linux, they will use the good stuff people contribute to linux. rust or not.

    Leave a comment:


  • mdedetrich
    replied
    Originally posted by kpedersen View Post

    Sure, you say that Rust excels in this but lets wait and see them actually implement this whilst being able to access the required data without resorting to unsafe. This will be the only evidence.
    The unsafe part is the driver going to be addressing the necessary GPU registers/memory locations directly and/or directly doing underlying syscalls. This is always going to be unsafe, its literally impossible for it to not be (how are you going to prove to a compiler that pointing/addressing to some hardcoded memory location/pointer is "correct"?). Thats not why Rust is useful and is not even a point that actual sane people/programmers even contest, its just a stupid strawman that is brought up by people who don't know what they are talking about.
    Last edited by mdedetrich; 12 August 2022, 06:12 AM.

    Leave a comment:


  • kylew77
    replied
    I don't like to learn new things so hate Rust, but actually have a technical reason on why Rust is the wrong choice: other operating systems working on the M1 or M2. OpenBSD has a port for the Mac M1 and I think NetBSD does too. They will never accept a rust driver into their OS so why not stick to C so everybody can benefit?

    Leave a comment:


  • piotrj3
    replied
    For me it is perfect case scenario to make Rust proven. We have actual needed use case for Rust here, that driver only exist on ARM CPUs so limited scope of support for Rust is absolutly not an issue and never will be.

    Leave a comment:


  • jacob
    replied
    Originally posted by rene View Post

    only Redox & friends ;-)
    And now Windows.

    Leave a comment:


  • MadCatX
    replied
    Originally posted by dragon321 View Post
    I wonder if people that are against writing drivers in Rust because "Such important thing as driver should be written only in C" would be against C years ago saying "Such important thing as driver should be written only in Assembler".
    So true. Out of all dead-end, uninspired and downright backwardly technologies that computer science created in the past ~10 years, Rust is one of the few exceptions that is worth adopting.

    Leave a comment:


  • jaxa
    replied
    Prominent Asahi Linux contributor Asahi Lina
    You mean Hector Martin?

    Leave a comment:


  • rabcor
    replied
    I don't really care how they write it, just kinda sitting on the edge of my seat to see how it'll perform when they finally do.

    Leave a comment:

Working...
X