Originally posted by inout
View Post
Announcement
Collapse
No announcement yet.
Linux Developers May Discuss Allowing Rust Code Within The Kernel
Collapse
X
-
Originally posted by oleid View Post
Depends. If you restrict the new language to satellite code like drivers introducing a new language is not very invasive. Also, it might make the kernel-internal driver API more stable.
Different projects by different people. Some people are qualified to work on kernel code, others on GUI toolkits.
As far as I know, there are currently no plans to - say - rewrite GTK+. It might not make much sense, anyway, since there is shared state everywhere in existing GUI toolkits and that is - for good reason - unergonomic to work with in rust. E.g. one would need to use RefCells to do the borrow checking at runtime.
That being said, there are totally new toolkits in the works experimenting with idiomatic (as in: a different software architecture) ways for creating GUI toolkins in a thread-safe way. Just to name a few.
A data-first Rust-native UI design toolkit. . Contribute to linebender/druid development by creating an account on GitHub.
I've already worked a little with druid and I find it quite nice. Granted, they are not battle tested, yet(*). But considering the battles I've already fought with Qt5 in the context of shared state and OpenGL rendering (doesn't crash in one Qt version, crashes in the other) I wonder what battle tested actually means.
(*) OrbTK is the GUI toolkit for Redox-OS and it would seem druid is used for a font editor called Runebender sponsored by Google Fonts.
Comment
-
Originally posted by Almindor View PostI think you need to take this more like an evolution. If the Linux kernel stays in C it will eventually be left behind and replaced by something implemented in a more safe language that can provide the same (or even better) performance but with more safety guaranteed.
But I don't know if Rust is a evolution..
The syntax of the language seems very weird to me,
And I don't know either about type safety, it seems a pipe dream to me, apart from the fact that, there are code that at compile time does seem to have memory leaks, or NULL Pointers that will be dereferenced later, but when the code runs everything runs fine, without leaks or NULL pointers, etc..
Besides C is a language that is very simple, and its simplicity is awesome, I don't know about any real substitution to it..
I am afraid that adding a new language will turn the Linux Kernel in a Frankenstein thing..
- Likes 1
Comment
-
Originally posted by tuxd3v View Post
The syntax of the language seems very weird to me,
The only real difference we need to put on top is "mut" (which is basically propagate_const<T> in a nicer form) and replacing exception use with template return types.
The rest of the stuff (i.e the really important borrow checker) generally comes for free.
The only issue I have is faffing with Cargo offline. I will never connect a development workstation to the internet and Cargo really isn't geared up for this kind of isolated use. At the moment I just mirror the entirety of crates.io and distfiles but this is not really a solution for everyone. Luckily Rust in the kernel will likely not depend on Cargo so problem averted.Last edited by kpedersen; 13 July 2020, 09:37 AM.
- Likes 2
Comment
-
Originally posted by tuxd3v View PostI understand,
But I don't know if Rust is a evolution..
The syntax of the language seems very weird to me,
And I don't know either about type safety, it seems a pipe dream to me, apart from the fact that, there are code that at compile time does seem to have memory leaks, or NULL Pointers that will be dereferenced later, but when the code runs everything runs fine, without leaks or NULL pointers, etc..
Besides C is a language that is very simple, and its simplicity is awesome, I don't know about any real substitution to it..
I am afraid that adding a new language will turn the Linux Kernel in a Frankenstein thing..
I think the best "oooh" moment for me when I started to play with Rust and embedded systems was when it saved me from shorting a pin by compile time checks (because the Pin structure was designed in such a way to prevent reusing the same physical pin twice by accident). That was my "this is it" moment.
I definitely wouldn't use Rust for some tasks but embedded, systems/kernel programming, drivers and some back-end stuff is where I think it brings SO much to the table it'd be crime not to use it.
- Likes 3
Comment
-
Same picture as thousand times before. Same mantras, same paid clowns on the stage. If language with such unreadable syntax is not enough, the implementation is miserable pile of hipster shit. "systems" language developed by people who have no idea of proper bootstrapping, cross compiling and reproducible builds. Also, downloading random crap from the Internet during build process. It will get a middle finger from Linus. He is a sane person. Carefully weighting switch to gcc 4.9 and then allowing rust. Yeah, good luck.
- Likes 1
Comment
-
Originally posted by jjkk View Post"systems" language developed by people who have no idea of proper bootstrapping
Originally posted by jjkk View PostAlso, downloading random crap from the Internet during build process.
Comment
Comment