Macro xlang_abi::rustcall

source ·
macro_rules! rustcall {
    (extern "rustcall" fn $($tt:tt)*) => { ... };
    (unsafe extern "rustcall" fn $($tt:tt)*) => { ... };
    ($(#[$meta:meta])* $vis:vis extern "rustcall" fn $($tt:tt)*) => { ... };
    ($(#[$meta:meta])*  $vis:vis unsafe extern "rustcall" fn $($tt:tt)*) => { ... };
    (extern "rustcall" { $($item:item)*}) => { ... };
}
Expand description

A macro which allows definining functions, function pointer types, and extern blocks using the "rustcall" abi. This abi matches the ABI used by lcrust v0 for extern "Rust" functions, without #[track_caller] support. See The LCRust v0 ABI for details on the interface.

The exact expansion of this macro is unspecified and unstable. You cannot rely on the type of functions or function pointers produced by this interface, only the ABI.

Due to a defect, it is undefined behaviour to panic out of functions defined with this ABI. This is intended to be fixed in the future on as many compilers as possible