Originally posted by bug77
View Post
Announcement
Collapse
No announcement yet.
Mesa Developers Discuss The Possibility Of Rust Graphics Driver Code
Collapse
X
-
- Likes 1
-
Originally posted by oleid View Postthen better add [LANG_B] now, before one has to deal with [LANG_A] APIs
Mesa already has C++ in it so in many cases you would need to go C++ <> C <> Rust to communicate between them. This is messy, fragile, wasteful of resources and will likely also undermine many of Rust's interesting safety mechanisms anyway.Last edited by kpedersen; 02 October 2020, 12:59 PM.
- Likes 4
Comment
-
Originally posted by kpedersen View Post
Adding a high(er) level language like C++ or Rust causes issues when interfacing with it from any other languages. You provided a very good example why both C++ *and* Rust should be kept out of a number of underlying codebases.
Mesa already has C++ in it so in many cases you would need to go C++ <> C <> Rust to communicate between them. This is messy, fragile, wasteful of resources and will likely also undermine many of Rust's interesting safety mechanisms anyway.
And Rust was pretty much designed to have good compatibility with C code due to most of Mozilla's code being written in C.
The point is that the code that ends up written in Rust, has a reduced attack surface (even if other attack surfaces still exist), having low attack surface drivers is has been important for like 10 years but little has been done in that direction and this would be a big step.Last edited by cb88; 02 October 2020, 01:31 PM.
- Likes 6
Comment
-
Originally posted by cb88 View Post
That's disingenuous. Firstly Mesa barely has any C++ code.
And Rust was pretty much designed to have good compatibility with C code due to most of Mozilla's code being written in C.
The point is that the code that ends up written in Rust, has a reduced attack surface (even if other attack surfaces still exist), having low attach surface drivers is has been important for like 10 years but little has been done in that direction and this would be a big step.
I don't disagree that Rust is safer than C and C++ (and certainly *much* safer than how many developers use C++). But my vote is simply keep to homogenous C with everything and just AddressSanitize like hell. It gives a cleaner architecture overall.
- Likes 2
Comment
-
Originally posted by kpedersen View PostThe difficulty arises trying to have good compatibility between two higher level languages (C++ <> Rust). .
Originally posted by kpedersen View PostBut my vote is simply keep to homogenous C with everything and just AddressSanitize like hell. It gives a cleaner architecture overall.Last edited by oleid; 02 October 2020, 01:43 PM.
- Likes 5
Comment
-
Keeping things as is for the time being is an argument I get. Moving to C++ instead of moving to Rust when they are already considering moving? That I don't get. And I'm saying it as a someone who likes C++ in general. But Rust is so much better!
Though reading through the comments, most actually agree there that Rust is a better option than C and C++. So outlook is positive in that thread.Last edited by shmerl; 02 October 2020, 02:22 PM.
- Likes 5
Comment
-
Originally posted by ed31337 View PostYeah, and then when Mozilla implodes and takes down Rust with it, what then?
https://blog.rust-lang.org/2020/08/1...ts-future.html
- Likes 4
Comment
Comment