4 ms·
Rust's internal ABI (i.e. used for a default `fn foo() { ... }`) is not at all stable/usable/specified. However, you can easily define a function with a C ABI
by dbaupp 12y ago
Rust's internal ABI (i.e. used for a default `fn foo() { ... }`) is not at all stable/usable/specified.
However, you can easily define a function with a C ABI (and a non-mangled symbol name):
#[no_mangle]
pub extern "C" fn foo() { ... }
I'm not sure if you regard this as better than C++'s situation.