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 subsequent pr_cont!and a new sample.
  • `alloc` crate::RawVec and Vec new constructor for try_with_capacity() and try_with_capacity_in().
  • Procedural Macros: New Macros #[vtable] and concat_idents!and for module! Better ergonomics for the user.
  • Assertion: new macro static_assert!,build_error! and build_assert!and new crates that support them build_error.
  • Vocabulary type: new type Opaque and Either.
  • Debug: New Macro dbg!.

For full details on the Rust patch, see the Rust PR mail in the kernel.

#Linux #Batch #Rust #Infrastructure #Code

Leave a Comment

Your email address will not be published. Required fields are marked *