RISC-V Now Supports Rust In the Linux Kernel (phoronix.com) 31
Michael Larabel reports via Phoronix: The latest RISC-V port updates have been merged for the in-development Linux 6.10 kernel. Most notable with today's RISC-V merge to Linux 6.10 is now supporting the Rust programming language within the Linux kernel. RISC-V joins the likes of x86_64, LoongArch, and ARM64 already supporting the use of the in-kernel Rust language support. The use of Rust within the mainline Linux kernel is still rather limited with just a few basic drivers so far and a lot of infrastructure work taking place, but there are a number of new drivers and other subsystem support on the horizon. RISC-V now supporting Rust within the Linux kernel will become more important moving forward.
The RISC-V updates for Linux 6.10 also add byte/half-word compare-and-exchange, support for Zihintpause within hwprobe, a PR_RISCV_SET_ICACHE_FLUSH_CTX prctl(), and support for lockless lockrefs. More details on these RISC-V updates for Linux 6.10 via this Git merge.
The RISC-V updates for Linux 6.10 also add byte/half-word compare-and-exchange, support for Zihintpause within hwprobe, a PR_RISCV_SET_ICACHE_FLUSH_CTX prctl(), and support for lockless lockrefs. More details on these RISC-V updates for Linux 6.10 via this Git merge.
Rust is rubbish?? (Score:1, Interesting)
Re: (Score:3)
Re: (Score:3)
Re: (Score:2)
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
You can use Rc (referenced counted smart pointer) or Arc (same, but atomic access for cross thread) for doubly linked lists, I think. But then, I'm only a few months into learning Rust.
Re: (Score:2)
Re: (Score:2)
It just takes attention to and care with the details.
That can be a problem (even the problem), especially if you're on the clock...
Rust In the Linux Kernel (Score:2)
Rust In the Linux Kernel
I thought the kernel was looking a little corroded. Nothing that a little "C"lr can't fix.
Re: (Score:2)
Writing memory safe C isn't that difficult for a competent programmer.
Incompetent programmers are cheaper.
Re: (Score:2)
Writing memory safe C isn't that difficult for a competent programmer.
The wreckage of the last 50 years of computing history demonstrates that assertion to be completely false for any realistic definition of "competent programmer".
In principle, any C program could be written without memory bugs, just like in principle all NP-complete problems have a solution. That doesn't mean that you could actually do either thing in the real world.
Re: (Score:2)
Really creepy bunch.
Re: (Score:2)
> Writing memory safe C isn't that difficult for a competent programmer. It just takes attention to and care with the details.
"There's nothing that can be made about improving memory safety, say developers using the programming language with the most memory safety issues."
Memory safety is hardly the only thing Rust has going for it, though.
It also has a pretty nice type system with ML-like algebraic data types (with the surprisingly accurate trite "make invalid state inexpressible") and traits, the com
Who writes nonsense like this? (Score:5, Insightful)
RISC-V is a processor architecture.
Since when does a processor architecture support a specific programming language?
It is the other way around. ...
The Rust compiler can compile to RISC-V.
And it can be done for kernel code, what ever there is special about that
Re: Who writes nonsense like this? (Score:3)
RISC-V is also a an arch build target, and it's perfectly reasonable to say that a target platform in a build system supports such and such
Re: (Score:3)
RISC-V is also a an arch build target, and it's perfectly reasonable to say that a target platform in a build system supports such and such
Sure, sure. We get it. But then just *say* "Rust target added for RISC-V kernel builds". Or *something* that isn't so completely bass-ackwards.
Re: (Score:2)
Sure, sure. We get it.
Yes, any person for whom this information is relevant for gets it and understands it perfectly fine. So who other than somebody who is desperate to feel like they have something "useful" to say in the absence of anything else gives a fuck?
Nobody, that's who.
Re: (Score:2)
Old man is based.
Re: (Score:2)
I read it as "RISC-V (target) now supports rust in the kernel"
And from what I understand (which admittedly is barely enough to follow along) kernel rust (and C/C++) IS special. Something to do with how kernel stack/heap allocation works and so you can't use everything in the language or the standard libraries which will assume a userspace model that's incompatible. But that's the limit of what I "know" so google will have to be your friend.
Re: (Score:1)
Normal non-autistic people write like this.
> Since when does a processor architecture support a specific programming language?
It is trival to conclude for most readers that what they're talking about is the community supporting the RISC-V architecture in the linux kernel.
Gaslighting grammar nazis might also feign confusion but they mostly left for Facebook.
We should recognize that this site might benefit from accessible writing in submissions.
Re: (Score:2)
Since when does a processor architecture support a specific programming language?
What kind of terrible interpretation is this? The title and summary state that this is for "kernel development" specific to a processor.
And it can be done for kernel code, what ever there is special about that ...
Yes because any language can be compiled for the Linux kernel. Just the other day, I was compiling COBOL to make a Linux kernel . . . oh wait I meant C11. It is like Linux kernel code can only be certain languages like C11 and now Rust.
Re: (Score:2)
Yes because any language can be compiled for the Linux kernel. ...
That is exactly what I said
No idea about your point.
Re: (Score:2)
First line of the summary: "The latest RISC-V port..."
The headline writer seemingly thought the word "port" was unnecessary or redundant. That's its own problem.
That’s funny (Score:3)
Is there a powerful enough RISCV system to compile rust natively?
"Risk is good..." (Score:2)
"Risk is good..." Crash Override 1995
Floating point already (Score:2)
If RISC V wants adoption they need to add floating point instructions. The FAUST project did all the work and did the VHDL - why can't we find it in a commercial offering???
As it stands, RISC V remains a microcontroller! And not the best value one either!