From 394ee932f1ef97cc9dfbdc9b0fef9d7b62ec2ca5 Mon Sep 17 00:00:00 2001 From: chrysn Date: Sat, 11 Jun 2022 03:07:26 +0200 Subject: [PATCH] rust_riotmodules: pub use instead of extern crate See-Also: https://github.com/RIOT-OS/RIOT/pull/16833#issuecomment-1071243210 --- sys/rust_riotmodules/src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/rust_riotmodules/src/lib.rs b/sys/rust_riotmodules/src/lib.rs index 7cfc869e4ce5..819c4a5391e2 100644 --- a/sys/rust_riotmodules/src/lib.rs +++ b/sys/rust_riotmodules/src/lib.rs @@ -1,13 +1,14 @@ #![no_std] -// As we're pulling all crates in only for their side effects of having symbols (be that to place -// them in XFA symbols or to make them available for C) all these crates have to be extern-crate'd -// to be pulled in because they are not used on the laguage level. +// Crates in here are pub used in case they make anything accessible to Rust applications directly; +// they can then access the crates as `rust_riotmodules::lsm303agr` or similar. +// +// (Also, if they were not pub used, they'd need to be extern crate'd). // This list should be as auto-generated / -maintained as the one in Cargo.toml #[cfg(feature = "riot-module-lsm303agr")] -extern crate riot_module_lsm303agr; +pub use riot_module_lsm303agr as lsm303agr; #[cfg(feature = "riot-module-shell-democommands")] -extern crate riot_module_shell_democommands; +pub use riot_module_shell_democommands as democommands;