1 // SPDX-License-Identifier: GPL-2.0
3 //! The `kernel` prelude.
5 //! These are the most common items used by Rust code in the kernel,
6 //! intended to be imported by all Rust code, for convenience.
11 //! use kernel::prelude::*;
15 pub use core::pin::Pin;
18 pub use alloc::{boxed::Box, vec::Vec};
21 pub use macros::{module, pin_data, pinned_drop, vtable};
23 pub use super::build_assert;
25 // `super::std_vendor` is hidden, which makes the macro inline for some reason.
28 pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
30 pub use super::{init, pin_init, try_init, try_pin_init};
32 pub use super::static_assert;
34 pub use super::error::{code::*, Error, Result};
36 pub use super::{str::CStr, ThisModule};
38 pub use super::init::{InPlaceInit, Init, PinInit};
40 pub use super::current;