Linux 6.1 incorporated the original Rust infrastructure, but now that Linux 6.1 has been released as a stable release, its Rust support is still in its infancy, without any end-user-facing Rust features.
Linux 6.2 is still supplementing the Rust code. According to foreign media Phoronix, Miguel Ojeda, the kernel developer responsible for the Rust For Linux part, has issued a new PR to the Linux 6.2 merge window to provide a new batch of Rust base code.
Similar to the Rust support in Linux 6.1, the Rust code for Linux 6.2 continues to provide more functionality to Rust’s kernel builds, and has not yet introduced any new Rust-written hardware drivers, so it is more useful to kernel developers. The latest Rust for Linux 6.2 patches include the following:
- Strings and formats: new types `CString`, `CStr`, `BStr`, and `Formatter`; new macros “c_str!”, “b_str!”, and “fmt!”.
- Errors: Rest of the error codes from errno-base.h, and some From attribute implementations of the Error type.
- Printing: the rest
pr_*!
level and subsequentpr_cont!
and a new sample. - `alloc` crate::
RawVec
andVec
new constructor fortry_with_capacity()
andtry_with_capacity_in()
. - Procedural Macros: New Macros
#[vtable]
andconcat_idents!
and formodule!
Better ergonomics for the user. - Assertion: new macro
static_assert!
,build_error!
andbuild_assert!
and new crates that support thembuild_error
. - Vocabulary type: new type
Opaque
andEither
. - Debug: New Macro
dbg!
.
For full details on the Rust patch, see the Rust PR mail in the kernel.
#Linux #Batch #Rust #Infrastructure #Code