1 2 3 4 5 6 7 8 9 10 11
#[repr(C)] struct Foo {} impl Foo { const GA: i32 = 10; const BU: &'static str = "hello world"; const ZO: f32 = 3.14; } #[no_mangle] pub extern "C" fn root(x: Foo) { }