Earlier quoted context omitted.
There are certain styles of programming and data structure implementations that end up requiring you to fight Rust at almost every step. Things like intrusive data structures, pointer manipulation and so on. Famously there is an entire book online on how to write a performant linked list in idiomatic Rust - something that is considered straightforward in C. For these cases you could always use Zig instead of C
what is an intrusive data structure?
Rust in the kernel is no longer experimental
241–250 of 853 posts
Re: Rust in the kernel is no longer experimental
#242Earlier quoted context omitted.
I think you didn't catch their drift C will continue to be used because it always has been and always will be available everywhere, not only places no one uses :/
> C will continue to be used because it always has been and always will be available everywhere Yes, you can use it everywhere. Is that what you consider a success?
Languages like Rust a probably more successful in terms of age vs. adoption speed. There's just a good number of platforms which aren't even supported, and where you have no other choice than C. Rust can't target most platforms, and it compiles on even less. Unless Linux want's to drop support for a good number of platforms, Rust adoption can only go so far.
Re: Rust in the kernel is no longer experimental
#243Re: Rust in the kernel is no longer experimental
#244And yet, the Linux kernel's Rust code uses unstable features only available on a nightly compiler. Not optimal for ease of compilation and building old versions of the Kernel. (You need a specific version of the nightly compiler to build a specific version of the Kernel)
Re: Rust in the kernel is no longer experimental
#245Re: Rust in the kernel is no longer experimental
#246Earlier quoted context omitted.
Can you expand on bitfields? There’s crates that implement bitfield structs via macros so while not being baked into the language I’m not sure what in practice Rust isn’t able to do on that front.
Yeah, not sure what they're saying... I use bitfields in multiple of my rust projects using those macros.
Re: Rust in the kernel is no longer experimental
#247Re: Rust in the kernel is no longer experimental
#248[flagged]
2. End users absolutely do not care in which programming language an application (or OS, they can't tell the difference and don't care) is written in. They only care if it does the job they need quickly, safely and easily.
Re: Rust in the kernel is no longer experimental
#249Not a system programmer -- at this point, does C hold any significant advantage over Rust? Is it inevitable that everything written in C is going to be gradually converted to safer languages?
Every system under the Sun has a C compiler. This isn't remotely true for Rust. Rust is more modern than C, but has it's own issues, among others very slow compilation times. My guess is that C will be around long after people will have moved on from Rust to another newfangled alternative.
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/c...
Re: Rust in the kernel is no longer experimental
#250Rust in the kernel feels like a red herring. For fault tolerance and security, wouldn’t it be a superior solution to migrate Linux to a microkernel architecture? That way, drivers and various other components could be isolated in sandboxes.
Rust would still help to eliminate those bugs.