1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#![allow(unexpected_cfgs)] #[cxx::bridge] mod ffi { struct Empty {} } #[cxx::bridge] mod ffi2 { struct ConditionallyEmpty { #[cfg(target_os = "nonexistent")] never: u8, #[cfg(target_os = "another")] another: u8, } } fn main() {}