summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2024-08-17 17:51:32 +0100
committerMiguel Ojeda <ojeda@kernel.org>2024-08-19 11:09:02 +0200
commite26fa546042add70944d018b930530d16b3cf626 (patch)
tree59886ef725af8e888156f16514282e13ed895684 /rust/helpers/helpers.c
parentc4d7f546dd9aa9780716cdb07416ca97264dce43 (diff)
downloadlwn-e26fa546042add70944d018b930530d16b3cf626.tar.gz
lwn-e26fa546042add70944d018b930530d16b3cf626.zip
rust: kbuild: auto generate helper exports
This removes the need to explicitly export all symbols. Generate helper exports similarly to what's currently done for Rust crates. These helpers are exclusively called from within Rust code and therefore can be treated similar as other Rust symbols. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Tested-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20240817165302.3852499-1-gary@garyguo.net [ Fixed dependency path, reworded slightly, edited comment a bit and rebased on top of the changes made when applying Andreas' patch (e.g. no `README.md` anymore, so moved the edits). - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
-rw-r--r--rust/helpers/helpers.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
index 2b54f22e8774..173533616c91 100644
--- a/rust/helpers/helpers.c
+++ b/rust/helpers/helpers.c
@@ -4,19 +4,6 @@
* cannot be called either. This file explicitly creates functions ("helpers")
* that wrap those so that they can be called from Rust.
*
- * Even though Rust kernel modules should never use the bindings directly, some
- * of these helpers need to be exported because Rust generics and inlined
- * functions may not get their code generated in the crate where they are
- * defined. Other helpers, called from non-inline functions, may not be
- * exported, in principle. However, in general, the Rust compiler does not
- * guarantee codegen will be performed for a non-inline function either.
- * Therefore, this file exports all the helpers. In the future, this may be
- * revisited to reduce the number of exports after the compiler is informed
- * about the places codegen is required.
- *
- * All symbols are exported as GPL-only to guarantee no GPL-only feature is
- * accidentally exposed.
- *
* Sorted alphabetically.
*/