October 1, 2020 8:36 PM, "Alyssa Rosenzweig" <alyssa.rosenzw...@collabora.com> wrote: > Hi all, > > Recently I've been thinking about the potential for the Rust programming > language in Mesa. Rust bills itself a safe system programming language > with comparable performance to C [0], which is a naturally fit for > graphics driver development. > > Mesa today is written primarily in C, a notoriously low-level language, > with some components in C++. To handle the impedance mismatch, we've > built up a number of abstractions in-tree, including multiple ad hoc > code generators (GenXML, NIR algebraic passes, Bifrost disassembler). A > higher level language can help avoid the web of metaprogramming and > effect code that is simpler and easier to reason about. Similarly, a > better type system can aid static analysis.
Drive by comment; When I was working on porting Mesa/Gallium Softpipe over to Haiku (several years ago now), there was some *really* hairy C downcasting/upcasting in some critical places which made it *extremely* difficult to decode what was going on without pulling out pen and paper. Excited to potentially see some Rust in Mesa. Even Haiku has a Rust port ;-) -- Alex _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev