Crates can re-export crates on which they depend. In this example, the stm32f103xx-hal
crate does that: pub extern crate stm32f103xx;
.
In my code, I depend on stm32f103xx-hal
. Now I want to use the interrupt!()
macro that is exported by the stm32f103xx
crate. Do I have to add a stm32f103xx
crate dependency to my Cargo.toml, or is there a way to re-use the exported definition of stm32f103xx-hal
?
Note that this is a different problem from simply "how to use a macro from a different crate". Declaring #[macro_use(interrupt)]
on stm32f103xx-hal
yields a cannot find macro 'interrupt!' in this scope
error.