diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2025-03-08 11:05:01 +0000 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2025-03-16 21:59:19 +0100 |
commit | d7659acca7a390b5830f0b67f3aa4a5f9929ab79 (patch) | |
tree | 0550bee1f3ef6ca47af75ab9624cd510a1963b1f /rust/pin-init | |
parent | b321b9385409800859c2be722c6141909c7221b3 (diff) |
rust: add pin-init crate build infrastructure
Add infrastructure for moving the initialization API to its own crate.
Covers all make targets such as `rust-analyzer` and `rustdoc`. The tests
of pin-init are not added to `rusttest`, as they are already tested in
the user-space repository [1].
Link: https://github.com/Rust-for-Linux/pin-init [1]
Co-developed-by: Benno Lossin <benno.lossin@proton.me>
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250308110339.2997091-15-benno.lossin@proton.me
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/pin-init')
-rw-r--r-- | rust/pin-init/internal/src/_lib.rs | 3 | ||||
-rw-r--r-- | rust/pin-init/internal/src/lib.rs | 4 | ||||
-rw-r--r-- | rust/pin-init/src/_lib.rs | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/rust/pin-init/internal/src/_lib.rs b/rust/pin-init/internal/src/_lib.rs new file mode 100644 index 0000000000000..0874cf04e4cb3 --- /dev/null +++ b/rust/pin-init/internal/src/_lib.rs @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + +//! Will be removed in a future commit, only exists to prevent compilation errors. diff --git a/rust/pin-init/internal/src/lib.rs b/rust/pin-init/internal/src/lib.rs index bf66cbee25316..3146da5cc47cc 100644 --- a/rust/pin-init/internal/src/lib.rs +++ b/rust/pin-init/internal/src/lib.rs @@ -1,5 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 OR MIT +// When fixdep scans this, it will find this string `CONFIG_RUSTC_VERSION_TEXT` +// and thus add a dependency on `include/config/RUSTC_VERSION_TEXT`, which is +// touched by Kconfig when the version string from the compiler changes. + #[allow(missing_docs)] #[proc_macro_attribute] pub fn pin_data(inner: TokenStream, item: TokenStream) -> TokenStream { diff --git a/rust/pin-init/src/_lib.rs b/rust/pin-init/src/_lib.rs new file mode 100644 index 0000000000000..e0918fd8e9e71 --- /dev/null +++ b/rust/pin-init/src/_lib.rs @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + +//! Will be removed in a future commit, only exists to prevent compilation errors. + +#![no_std] |