[][src]Module ffishim::library

Types to be used by the FFI shim in the target programs.

The library contains all recurrent types that do not need to be generated, for example the C-compatible "vectors." The generated shim code will refer to library types whenever necessary.

We re-export rust's libc here to prevent users from having to declare libc as a direct dependency of their programs.

Re-exports

pub extern crate libc;

Structs

Error

The Error type, a wrapper around a dynamic error type.

FFIResult

A C-compatible result structure to replace rust's Result in the shim layer.

FFIVec

A C-compatible vector structure to replace rust's Vec in the shim layer.

Functions

free_result_function

No function declared in the ffishim library will be carried by the generated shared object library. The free_result function needs to be declared inside the generated crate. For this purpose, the derive_ffishim crate calls free_result_function to get the definition and insert it into the generated crate.