Skip to contents

All functions

ArrayType()
FFI Array Type
CIF()
FFI Call Interface (CIF)
EnumType()
FFI Enumeration Type
FFIClosure()
FFI Closure - R function as C callback
FFIType()
FFI Type representation
FieldInfo()
Field Information Class
NativeSymbol()
Native Symbol Reference
StructType()
FFI Structure Type
UnionType()
FFI Union Type
ffi_alloc()
Allocate a buffer for a given FFI type
bindgen_r_api()
Generate FFI bindings for R's C API
bindgen_r_api_summary()
Get summary of R API bindings
create_builtin_type()
Create built-in FFI type
data_ptr()
Get data pointer from R vector with GC protection
data_ptr_ro()
Get read-only data pointer from R vector with GC protection
dll_ffi_symbol()
Create FFI function from dynamically loaded function
dll_info()
Get information about a loaded library
dll_is_loaded()
Check if a symbol is loaded
dll_list_loaded()
List loaded libraries
dll_load() dll_unload() dll_symbol() dll_compile_and_load() dll_load_system() dll_load_r()
Load a shared library/DLL
escape_r_name()
Escape R name with backticks if needed
ffi_all_offsets()
Get all field offsets for a struct
ffi_alloc_buffer()
Allocate a raw memory buffer (external pointer, auto-finalized)
ffi_array_type()
Create an FFI array type
ffi_bool()
Bool FFI type
ffi_call()
Make FFI function call
ffi_char()
Char FFI type
ffi_cif()
Prepare FFI call interface Prepare FFI call interface
ffi_cif_var()
Prepare FFI call interface for variadic functions
ffi_closure()
Create an FFI closure from an R function
ffi_closure_pointer()
Get the function pointer for an FFI closure
ffi_closures_supported()
Check if closures are supported on this platform
ffi_copy_array()
Copy array from native memory
ffi_copy_array_type()
Copy array from native memory (ArrayType version)
ffi_create_bitfield_accessors()
Create accessor functions for a bit-field structure
ffi_deref_pointer()
Dereference a pointer
ffi_double()
double FFI type
ffi_enum()
Create FFI enumeration type
ffi_enum_to_int()
Convert enum name to integer value
ffi_extract_bit_field()
Extract a single bit-field from a packed value
ffi_extract_bits64()
Extract a single bit-field from a 64-bit packed value
ffi_extract_signed_bit_field()
Extract a signed bit-field from a packed value
ffi_extract_signed_bits64()
Extract a signed bit-field from a 64-bit packed value
ffi_field_info()
Get field information from a struct type
ffi_fill_typed_buffer()
Fill a typed buffer from an R vector (int or double)
ffi_float()
float FFI type
ffi_free()
Free memory pointed to by an external pointer
ffi_function()
Create a reusable FFI function wrapper
ffi_get_element()
Get element from struct array
ffi_get_field()
Get field value from FFI structure
ffi_int()
int FFI type
ffi_int16()
Int16 FFI type
ffi_int32()
Int32 FFI type
ffi_int64()
Int64 FFI type
ffi_int8()
Int8 FFI type
ffi_int_to_enum()
Convert integer value to enum name
ffi_is_null()
Check if external pointer is NULL
ffi_loaded_libs()
Get information about loaded native libraries
ffi_long()
long FFI type
ffi_longdouble()
longdouble FFI type
ffi_longlong()
long long FFI type
ffi_null_pointer()
Create a NULL pointer
ffi_offsetof()
Get byte offset of a field in a structure
ffi_pack_bits()
Pack bit-fields into an integer
ffi_pack_bits64()
Pack bit-fields into a 64-bit value
ffi_parse_header()
Parse C header file and create structured result
ffi_pointer()
pointer FFI type
ffi_print_struct()
Pretty print struct contents
ffi_raw()
Char FFI type
ffi_read_global()
Read a global variable from a shared library
ffi_set_bit_field()
Set a single bit-field in a packed value
ffi_set_bits64()
Set a single bit-field in a 64-bit packed value
ffi_set_field()
Set field value in FFI structure
ffi_short()
short FFI type
ffi_size_t()
Size_t FFI type
ffi_sizeof()
Get size of FFI type in bytes
ffi_ssize_t()
ssize_t FFI type
ffi_string()
String FFI type
ffi_struct()
Create FFI structure type
ffi_struct_array_from_list()
Allocate array of structs from R list
ffi_struct_from_list()
Create and initialize a struct from R list
ffi_struct_to_list()
Convert struct to R list
ffi_symbol()
Get native symbol reference
ffi_symbol_from_address()
Create native symbol from direct address
ffi_uchar()
Uchar FFI type
ffi_uint()
uint FFI type
ffi_uint16()
Uint16 FFI type
ffi_uint32()
Uint32 FFI type
ffi_uint64()
Uint64 FFI type
ffi_uint8()
Uint8 FFI type
ffi_ulong()
ulong FFI type
ffi_ulonglong()
ulonglong FFI type
ffi_union()
Create FFI union type
ffi_unpack_bits()
Unpack bit-fields from an integer
ffi_unpack_bits64()
Unpack bit-fields from a 64-bit value
ffi_ushort()
Ushort FFI type
ffi_validate_call()
Validate FFI call prerequisites
ffi_void()
void FFI type
ffi_wchar_t()
Wide char FFI type
generate_enum_definition()
Generate R enum definition from parsed enum
generate_function_wrapper()
Generate R function wrapper from parsed function
generate_package_from_headers()
Generate complete package from header files Generate complete package from header files
generate_package_init()
Generate .onLoad/.onUnload for package
generate_r_bindings()
Generate R bindings from parsed header
generate_struct_definition()
Generate R struct definition from parsed struct
generate_struct_helpers()
Generate struct helper functions (allocator, from_list, to_list)
generate_typedef_definition()
Generate R typedef alias from parsed typedef
generate_union_definition()
Generate R union definition from parsed union
get_pointer_type()
Get pointer type tag
is_null_pointer()
Check if pointer is NULL
is_protected_ptr()
Check if an object is a protected SEXP pointer
libffi_version()
Get libffi version string
make_typed_pointer()
Create typed external pointer
pointer_to_string()
Convert pointer to string safely
pointer_to_string_safe()
Convert pointer to string safely
ptr_to_sexp()
Get the R object from a protected SEXP pointer
release_ptr()
Manually release a protected pointer
sexp_helpers
SEXP Pointer Helpers for Safe FFI Usage
sexp_ptr()
Get SEXP pointer from R object with GC protection
tcc_available()
Check if TCC is available
tcc_binary_path()
Get path to embedded TCC binary
tcc_extract_defines()
Extract #define macros from C header file or preprocessed lines
tcc_preprocess()
Preprocess C header file using embedded TCC
tcc_run()
Compile and run C code using embedded TCC