Terminology
Exported item
An exported item is one marked with the #[ezffi::export] macro.
Rust and C types
This book calls Rust-type the types defined in Rust by the user and marked with the #[ezffi::export] macro, and C-type the types created by the macro that are used as parameters in the exported functions.
C-compatible
In this book, a C-compatible item is one that has an equivalent in C by default. Currently the C-compatible items this crate cares about are:
- Primitives such as
i32,u64, etc. extern "C"function pointers.
A Rust-type or C-type will also be called C-compatible if all of its fields are C-compatible, that includes other C-compatible Rust-types and C-types. It's also important to note that the C-type and the Rust-type are internally the same type if they are C-compatible: ezffi just uses a type alias to let you, the ezffi user, keep referring to it by the original name you gave to your struct.