16.1 C
import c "zlib.h" { deflate, inflate, z_stream }
extern c fn getpid() -> i32
export c fn oxl_handle(req: *u8, len: usize) -> i32 { … }import creads a header through libclang at compile time. Type mapping:int→i32,size_t→usize, pointers →*T/*var T, structures →@c_layout data.- Calling an FFI function is only possible in
unsafe. A safe wrapper is an ordinary function withunsafeinside. export c fnexports a function with the C ABI; a panic at the boundary is turned into returning an error code and a log entry.
Related diagnostics
See also
Source: docs/spec/oxl-standard.en.md