The Linux Kernel Prepares for Rust 1.77 Upgrade
phoronix.com
The Linux Kernel Prepares for Rust 1.77 Upgrade
1–10 of 107 posts
Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#2I've only used rust nightly for my own projects and didn't give too much thought about rust versions
Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#3Do I understand it correctly that upgrading to a new rust version is mostly implementing new best practices and new features, instead of needing to "fix" your code, as rust is backwards compatible? I've only used rust nightly for my own projects and didn't give too much thought about rust versions
And you can use clippy to tell you about changes you should make.
For example, in my projects I run this in the CI pipeline:
cargo clippy --all-targets --all-features
and cargo fmt --all --check
In addition to the regular test and build steps.This both means that I follow clippy recommendations and cargo fmt in the first place, and also that my CI tells me about any clippy changes if I didn’t notice them myself as well as any formatting I’m not following. In my main IDE I auto format the code of course. But sometimes I make small changes in vim and don’t run the format step myself so it’s nice to have for that reason as well.
For the integration of Rust into the Linux kernel I imagine it’s a bit more convoluted.
Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#4One issues I have had with Rust applications is the huge binary size (yes, I know this has improved a bit lately). Is there a good comparison between kernel C and kernel Rust code in this regard?
Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#5Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#6Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#7The LKM post mentions binary size improvements. One issues I have had with Rust applications is the huge binary size (yes, I know this has improved a bit lately). Is there a good comparison between kernel C and kernel Rust code in this regard?
Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#8The LKM post mentions binary size improvements. One issues I have had with Rust applications is the huge binary size (yes, I know this has improved a bit lately). Is there a good comparison between kernel C and kernel Rust code in this regard?
Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#9Rust is going to kill LFS
What are the implications of using Rust on building Linux?
Re: The Linux Kernel Prepares for Rust 1.77 Upgrade
#10The LKM post mentions binary size improvements. One issues I have had with Rust applications is the huge binary size (yes, I know this has improved a bit lately). Is there a good comparison between kernel C and kernel Rust code in this regard?
Most size issues come from not using release builds, using too many dependencies, or overuse of generics. The rust std lib being linked in statically also contributes.The kernel shouldn't suffer from any of these problems. Plenty of embedded use is able to use rust in highly constrained environments without size issues compared to C.