[][src]Crate libffi_sys

Low-level Rust bindings for libffi

The C libffi library provides two main facilities: assembling calls to functions dynamically, and creating closures that can be called as ordinary C functions.

This is an undocumented wrapper, originally generated by bindgen then cleaned up manually, intended as the basis for higher-level bindings, but you can see the C libffi documentation.

See the libffi crate for a higher-level API.

Usage

libffi-sys can either build its own copy of the libffi C library from github or it can link against your system’s C libffi. By default it builds its own because many systems ship with an old C libffi; this requires that you have a working make, C compiler, automake, and autoconf first. If your system libffi is new enough (v3.2.1 as of October 2019), you can instead enable the system feature flag to use that. If you want this crate to build a C libffi for you, add

[dependencies]
libffi-sys = "1.1.0"

to your Cargo.toml. If you want to use your system C libffi, then

[dependencies.libffi-sys]
version = "1.1.0"
features = ["system"]

to your Cargo.toml instead.

This crate supports Rust version 1.32 and later.

Structs

ffi_cif
ffi_closure
ffi_go_closure
ffi_java_raw_closure
ffi_raw_closure
ffi_type

Constants

FFI_64_BIT_MAX
FFI_CLOSURES
FFI_NATIVE_RAW_API
FFI_SIZEOF_ARG
FFI_SIZEOF_JAVA_RAW
FFI_TRAMPOLINE_SIZE
FFI_TYPE_COMPLEX
FFI_TYPE_DOUBLE
FFI_TYPE_FLOAT
FFI_TYPE_INT
FFI_TYPE_LAST
FFI_TYPE_LONGDOUBLE
FFI_TYPE_POINTER
FFI_TYPE_SINT8
FFI_TYPE_SINT16
FFI_TYPE_SINT32
FFI_TYPE_SINT64
FFI_TYPE_STRUCT
FFI_TYPE_UINT8
FFI_TYPE_UINT16
FFI_TYPE_UINT32
FFI_TYPE_UINT64
FFI_TYPE_VOID
ffi_abi_FFI_DEFAULT_ABI
ffi_abi_FFI_FASTCALL
ffi_abi_FFI_FIRST_ABI
ffi_abi_FFI_LAST_ABI
ffi_abi_FFI_MS_CDECL
ffi_abi_FFI_PASCAL
ffi_abi_FFI_REGISTER
ffi_abi_FFI_STDCALL
ffi_abi_FFI_SYSV
ffi_abi_FFI_THISCALL
ffi_status_FFI_BAD_ABI
ffi_status_FFI_BAD_TYPEDEF
ffi_status_FFI_OK
ffi_type_enum_COMPLEX
ffi_type_enum_STRUCT

Statics

ffi_type_double
ffi_type_float
ffi_type_longdouble
ffi_type_pointer
ffi_type_sint8
ffi_type_sint16
ffi_type_sint32
ffi_type_sint64
ffi_type_uint8
ffi_type_uint16
ffi_type_uint32
ffi_type_uint64
ffi_type_void

Functions

ffi_call
ffi_call_go
ffi_closure_alloc
ffi_closure_free
ffi_get_struct_offsets
ffi_java_ptrarray_to_raw
ffi_java_raw_call
ffi_java_raw_size
ffi_java_raw_to_ptrarray
ffi_prep_cif
ffi_prep_cif_var
ffi_prep_closure
ffi_prep_closure_loc
ffi_prep_go_closure
ffi_prep_java_raw_closure
ffi_prep_java_raw_closure_loc
ffi_prep_raw_closure
ffi_prep_raw_closure_loc
ffi_ptrarray_to_raw
ffi_raw_call
ffi_raw_size
ffi_raw_to_ptrarray

Type Definitions

ffi_abi
ffi_arg
ffi_java_raw
ffi_sarg
ffi_status
ffi_type_enum

Unions

ffi_raw