ABI
The machine-level rules for how functions pass arguments and lay out data.
An ABI fixes calling conventions, register use, and data layout; extern "C" selects the platform's C ABI and #[repr(C)] gives a type C's layout.
Loading interactive…
Examples
Assigning a plain
fn(i32) -> i32to a variable of typeextern "C" fn(i32) -> i32fails with E0308: the two use different calling conventions.