Expand description
§errors — Error taxonomy and FFI result type
Provides FfiErrorCode (C-ABI enum), FfiError (rich Rust error),
FfiResult (C-ABI result wrapper), and the
catch_panic utility that prevents panics from crossing the FFI boundary.
§Key principle
Panics must never cross the FFI boundary. Undefined behaviour results if
a Rust panic unwinds into C or Go. Every extern "C" function in this crate
wraps its body in catch_panic.
Structs§
- FfiResult
- C-ABI result type.
Enums§
- FfiError
- Rich Rust-side error type that can be converted to an
FfiErrorCode+ message. - FfiError
Code - Numeric error codes that cross the FFI boundary.
Functions§
- catch_
panic - Run
fand convert any Rust panic into anFfiResulterror. - ffi_
result_ free - Free an
FfiResultand all heap memory it owns.