Expand description
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.
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 = "2.3.0"
to your Cargo.toml
. If you want to use your system C libffi, then
[dependencies.libffi-sys]
version = "2.3.0"
features = ["system"]
to your Cargo.toml
instead.
This crate supports Rust version 1.32 and later.
Structs§
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_ ARGTYPE - 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