Is there a way to use #[cfg]
attributes to conditionally compile code depending on what crate_type
is passed to rustc
? E.g.:
#[cfg(crate_type = "dylib")]
fn used_in_dynamic_libraries() { ... }
Is there a way to use #[cfg]
attributes to conditionally compile code depending on what crate_type
is passed to rustc
? E.g.:
#[cfg(crate_type = "dylib")]
fn used_in_dynamic_libraries() { ... }
Seems not. You can see the active settings with rustc --print cfg
.
Ah good tip. Thanks!