We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
External functions are declared like so:
pub fn ext "cdecl" my_public_fn() -> unit; priv fn ext "cdecl" my_private_fn() -> unit; pub fn ext "stdcall" my_stdcall_fn() -> unit; pub fn ext "cdecl" my_cdecl_flect_fn() -> int { 42; } priv fn ext "flect" my_flect_fn -> unit { }
There are a few things worth noting here:
ext
flect
Function pointer types are enhanced with an ext attribute:
let fptr : fn ext "cdecl"() -> unit = &my_public_fn;
A function pointer type with ext "flect" implicitly converts to the equivalent type without an explicit calling convention.
ext "flect"