An ABI is the machine-level calling convention: how arguments are passed, how values are returned, how a struct is laid out. Rust's own ABI is deliberately unstable, so crossing into C or C++ means opting into theirs.
Two attributes do it:
#[repr(C)] // lay this struct out the way C would
pub struct Point { x: i64, y: i64 }
#[no_mangle] // keep the symbol name as written
pub extern "C" fn point_sum(p: *const Point) -> i64
Without #[repr(C)], Rust may reorder fields for packing. Without #[no_mangle], the linker sees a mangled symbol no C caller can find.
