Originally posted by alpaca
View Post
Announcement
Collapse
No announcement yet.
Should GNOME Begin Replacing More C Code With Rust?
Collapse
X
-
- Likes 1
-
Originally posted by Michael_S View PostI'm trying to be practical. Points in favor of Rust:
1. The static type system protects against buffer overruns, use-after-free errors, and shared mutable state race conditions. That's a huge security win - the Linux kernel has some of the best C developers in the world, Chrome has some of the best C++ developers in the world, and those kinds of errors still routinely occur. Writing secure C or C++ is hard, multi-billion dollar companies that can afford the best talent in the world still have errors. You can get it right 999 times and wrong once and still get owned or annoy your user with a crash or hang.
2. All of the type system overhead is at compile time, the runtime gives C-like performance.
Points against Rust:
1. The GNOME project code is enormous. A rewrite in any language, even if they started over in C, would take a very long time. The only practical path is the one taken by Mozilla with the Servo project - start a parallel rewrite of components, and then swap the Rust modules in piecemeal for the originals as they mature. It works, but it's slow. Servo is four and a half years old and it's far from finished.
2. Many of the core GNOME contributors are already world class C developers, and the code they know best is the existing GNOME C code. It's not sexy, but maintaining production tested code is often a better investment of time than throwing aside thousands of hours of work for the joy of a clean start with the hottest tool.
I'm curious to see what they decide, I can see the advantages of either choice.
- Likes 1
Leave a comment:
-
I'm trying to be practical. Points in favor of Rust:
1. The static type system protects against buffer overruns, use-after-free errors, and shared mutable state race conditions. That's a huge security win - the Linux kernel has some of the best C developers in the world, Chrome has some of the best C++ developers in the world, and those kinds of errors still routinely occur. Writing secure C or C++ is hard, multi-billion dollar companies that can afford the best talent in the world still have errors. You can get it right 999 times and wrong once and still get owned or annoy your user with a crash or hang.
2. All of the type system overhead is at compile time, the runtime gives C-like performance.
Points against Rust:
1. The GNOME project code is enormous. A rewrite in any language, even if they started over in C, would take a very long time. The only practical path is the one taken by Mozilla with the Servo project - start a parallel rewrite of components, and then swap the Rust modules in piecemeal for the originals as they mature. It works, but it's slow. Servo is four and a half years old and it's far from finished.
2. Many of the core GNOME contributors are already world class C developers, and the code they know best is the existing GNOME C code. It's not sexy, but maintaining production tested code is often a better investment of time than throwing aside thousands of hours of work for the joy of a clean start with the hottest tool.
I'm curious to see what they decide, I can see the advantages of either choice.
- Likes 2
Leave a comment:
-
Originally posted by michal_229 View PostI think it is a good idea. I see many benefits (thread safety while being performant, no GC, zero cost abstractions, no need of maintaining Vala, Rust will have broad support).
- Likes 1
Leave a comment:
-
Originally posted by GrayShade View PostI would rather they replaced JavaScript with Rust.
Leave a comment:
-
Should GNOME Begin Replacing More C Code With Rust?
There are still important bugs to fix like this one: https://github.com/rust-lang/rfcs/issues/811
Leave a comment:
-
I don't see GLib being replaced soon, it's not something that you can just replace with something else and move on. If using Rust leads to safer and more readable code while maintaining backwards compatibility with software using the current C ABI, then that should be reason enough to move to Rust. C definitely isn't dead yet, but I think it is time to move on to something better.
Leave a comment:
-
Originally posted by grigi View Post
Having been in the Ruby thing at a time, I could say that it is unique to the Ruby community in how they always chase the next-big-thing, mostly because they find Ruby both awesome and revolting at the same time. Me, I'm actually glad I moved on from Ruby. Many reasons, the language is reasonable, but the community is toxic. It is also very PERL-like in how much pain legacy apps cause you.
Thanks.
Leave a comment:
-
Originally posted by eigenlambda View PostApplications have been written in whatever language for some time, a decade ago, everyone was talking up C# and RhythmBox was written in C#, as was Tomboy Notes. This guy wants to write applications in Rust? The great thing about gobject is that you can use it in any language, because it's a carefully crafted object system for desktop use.
But this guy doesn't want the burden of maintaining core libraries, which is fine, and he should keep his mouth shut about things he doesn't understand.
- Likes 1
Leave a comment:
-
Originally posted by liam View Post
Yes. If also works with dynamic languages like ruby and Python (at least, but probably others). For some reason there being a surprising amount of buzz in the Ruby community with regards to rust. This post (https://m50d.github.io/2015/09/28/wh...kes-sense.html) acknowledges it but doesn't provide a satisfactory answer, imho.
- Likes 1
Leave a comment:
Leave a comment: