Commit bda947d6 authored by Tamir Duberstein's avatar Tamir Duberstein Committed by Miguel Ojeda
Browse files

rust: kernel: add `fmt` module



`kernel::fmt` is a facade over `core::fmt` that can be used downstream,
allowing future changes to the formatting machinery to be contained
within the kernel crate without downstream code needing to be modified.

Signed-off-by: default avatarTamir Duberstein <tamird@gmail.com>
Reviewed-by: default avatarBenno Lossin <lossin@kernel.org>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250704-core-cstr-prepare-v1-2-a91524037783@gmail.com


Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent f411b7ed
Loading
Loading
Loading
Loading

rust/kernel/fmt.rs

0 → 100644
+7 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0

//! Formatting utilities.
//!
//! This module is intended to be used in place of `core::fmt` in kernel code.

pub use core::fmt::{Arguments, Debug, Display, Error, Formatter, Result, Write};
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@
pub mod faux;
#[cfg(CONFIG_RUST_FW_LOADER_ABSTRACTIONS)]
pub mod firmware;
pub mod fmt;
pub mod fs;
pub mod init;
pub mod io;