Package: RSimpleFFI 1.2.0.90000

RSimpleFFI: Simple Foreign Function Interface using 'S7' and 'libffi'

Simple Foreign Function Interface for 'R' using 'libffi' and 'S7' classes. Supports calling 'C' functions with type conversion and struct handling. Includes standard 'C' types (int8, int16, int32, int64, uint variants), platform types (size_t, bool), floating point types, and complex struct types. Header parsing uses 'Rtinycc' for 'TinyCC'-backed preprocessing and enables automatic generation of 'R' bindings from 'C' header files, simplifying package development for 'C' libraries.

Authors:Sounkou Mahamane Toure [aut, cre], Anthony Green, Red Hat, Inc and others [ctb]

RSimpleFFI_1.2.0.90000.tar.gz
RSimpleFFI_1.2.0.90000.zip(r-4.7)RSimpleFFI_1.2.0.90000.zip(r-4.6)RSimpleFFI_1.2.0.90000.zip(r-4.5)
RSimpleFFI_1.2.0.90000.tgz(r-4.6-x86_64)RSimpleFFI_1.2.0.90000.tgz(r-4.6-arm64)RSimpleFFI_1.2.0.90000.tgz(r-4.5-x86_64)RSimpleFFI_1.2.0.90000.tgz(r-4.5-arm64)
RSimpleFFI_1.2.0.90000.tar.gz(r-4.7-arm64)RSimpleFFI_1.2.0.90000.tar.gz(r-4.7-x86_64)RSimpleFFI_1.2.0.90000.tar.gz(r-4.6-arm64)RSimpleFFI_1.2.0.90000.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html
card.svg |card.png
RSimpleFFI/json (API)
NEWS

# Install 'RSimpleFFI' in R:
install.packages('RSimpleFFI', repos = c('https://sounkou-bioinfo.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sounkou-bioinfo/rsimpleffi/issues

Pkgdown/docs site:https://sounkou-bioinfo.github.io

Uses libs:
  • libffi– Foreign Function Interface library runtime

On CRAN:

Conda:

libffi

3.74 score 8 stars 23 scripts 139 exports 12 dependencies

Last updated from:668d9dd387. Checks:11 ERROR, 1 OK, 1 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64ERROR127
linux-devel-x86_64ERROR140
source / vignettesOK194
linux-release-arm64ERROR129
linux-release-x86_64ERROR137
macos-release-arm64ERROR94
macos-release-x86_64ERROR299
macos-oldrel-arm64ERROR85
macos-oldrel-x86_64ERROR192
windows-develERROR110
windows-releaseERROR121
windows-oldrelERROR110
wasm-releaseFAIL101

Exports:ArrayTypebindgen_r_apibindgen_r_api_summaryCIFcreate_builtin_typedata_ptrdata_ptr_rodll_compile_and_loaddll_ffi_symboldll_infodll_is_loadeddll_list_loadeddll_loaddll_load_rdll_load_systemdll_symboldll_unloadEnumTypeffi_all_offsetsffi_allocffi_alloc_bufferffi_array_typeffi_boolffi_callffi_charffi_cifffi_cif_varffi_cleanup_libffi_closureffi_closure_pointerffi_closures_supportedffi_compile_shlibffi_copy_arrayffi_copy_array_typeffi_create_bitfield_accessorsffi_create_helpersffi_deref_pointerffi_doubleffi_enumffi_enum_to_intffi_extract_bit_fieldffi_extract_bits64ffi_extract_signed_bit_fieldffi_extract_signed_bits64ffi_field_infoffi_field_to_rffi_fill_typed_bufferffi_floatffi_freeffi_functionffi_get_elementffi_get_fieldffi_get_symbolffi_intffi_int_to_enumffi_int16ffi_int32ffi_int64ffi_int8ffi_is_nullffi_loaded_libsffi_longffi_longdoubleffi_longlongffi_null_pointerffi_offsetofffi_pack_bitsffi_pack_bits64ffi_parse_headerffi_pointerffi_print_structffi_rawffi_read_globalffi_set_bit_fieldffi_set_bits64ffi_set_fieldffi_shortffi_size_tffi_sizeofffi_ssize_tffi_stringffi_structffi_struct_array_from_listffi_struct_from_listffi_struct_to_listffi_symbolffi_symbol_from_addressffi_ucharffi_uintffi_uint16ffi_uint32ffi_uint64ffi_uint8ffi_ulongffi_ulonglongffi_unionffi_unpack_bitsffi_unpack_bits64ffi_ushortffi_validate_callffi_voidffi_wchar_tFFIClosureFFITypeFieldInfogenerate_api_constructorgenerate_api_offset_extractorgenerate_api_r_wrappersgenerate_api_struct_helpersgenerate_api_struct_typedefgenerate_enum_definitiongenerate_function_wrappergenerate_package_from_headersgenerate_package_initgenerate_package_init_cgenerate_package_struct_helpers_cgenerate_r_bindingsgenerate_struct_definitiongenerate_struct_helpersgenerate_typedef_definitiongenerate_union_definitionget_pointer_typeis_null_pointeris_protected_ptrlibffi_versionmake_typed_pointerNativeSymbolpointer_to_stringpointer_to_string_safeptr_to_sexprelease_ptrsexp_ptrStructTypetcc_availabletcc_binary_pathtcc_extract_definestcc_preprocesstcc_runUnionType

Dependencies:cliformatRgluelambda.rlifecycleR6rlangRtinyccS7treesittertreesitter.cvctrs

Readme and manuals

Help Manual

Help pageTopics
FFI Array TypeArrayType
Generate FFI bindings for R's C APIbindgen_r_api
Get summary of R API bindingsbindgen_r_api_summary
FFI Call Interface (CIF)CIF
Create built-in FFI typecreate_builtin_type
Get data pointer from R vector with GC protectiondata_ptr
Get read-only data pointer from R vector with GC protectiondata_ptr_ro
Create FFI function from dynamically loaded functiondll_ffi_symbol
Get information about a loaded librarydll_info
Check if a symbol is loadeddll_is_loaded
List loaded librariesdll_list_loaded
Load a shared library/DLLdll_compile_and_load dll_load dll_load_r dll_load_system dll_symbol dll_unload
FFI Enumeration TypeEnumType
Escape R name with backticks if neededescape_r_name
Get all field offsets for a structffi_all_offsets
Allocate a buffer for a given FFI typeffi_alloc
Allocate a raw memory buffer (external pointer, auto-finalized)ffi_alloc_buffer
Create an FFI array typeffi_array_type
Bool FFI typeffi_bool
Make FFI function callffi_call
Char FFI typeffi_char
Prepare FFI call interface Prepare FFI call interfaceffi_cif
Prepare FFI call interface for variadic functionsffi_cif_var
Create an FFI closure from an R functionffi_closure
Get the function pointer for an FFI closureffi_closure_pointer
Check if closures are supported on this platformffi_closures_supported
Copy array from native memoryffi_copy_array
Copy array from native memory (ArrayType version)ffi_copy_array_type
Create accessor functions for a bit-field structureffi_create_bitfield_accessors
Create High-Level API Helpers for Structffi_create_helpers
Dereference a pointerffi_deref_pointer
double FFI typeffi_double
Create FFI enumeration typeffi_enum
Convert enum name to integer valueffi_enum_to_int
Extract a single bit-field from a packed valueffi_extract_bit_field
Extract a single bit-field from a 64-bit packed valueffi_extract_bits64
Extract a signed bit-field from a packed valueffi_extract_signed_bit_field
Extract a signed bit-field from a 64-bit packed valueffi_extract_signed_bits64
Get field information from a struct typeffi_field_info
Fill a typed buffer from an R vector (int or double)ffi_fill_typed_buffer
float FFI typeffi_float
Free memory pointed to by an external pointerffi_free
Create a reusable FFI function wrapperffi_function
Get element from struct arrayffi_get_element
Get field value from FFI structureffi_get_field
int FFI typeffi_int
Convert integer value to enum nameffi_int_to_enum
Int16 FFI typeffi_int16
Int32 FFI typeffi_int32
Int64 FFI typeffi_int64
Int8 FFI typeffi_int8
Check if external pointer is NULLffi_is_null
Get information about loaded native librariesffi_loaded_libs
long FFI typeffi_long
longdouble FFI typeffi_longdouble
long long FFI typeffi_longlong
Create a NULL pointerffi_null_pointer
Get byte offset of a field in a structureffi_offsetof
Pack bit-fields into an integerffi_pack_bits
Pack bit-fields into a 64-bit valueffi_pack_bits64
Parse C header file and create structured resultffi_parse_header
pointer FFI typeffi_pointer
Pretty print struct contentsffi_print_struct
Char FFI typeffi_raw
Read a global variable from a shared libraryffi_read_global
Set a single bit-field in a packed valueffi_set_bit_field
Set a single bit-field in a 64-bit packed valueffi_set_bits64
Set field value in FFI structureffi_set_field
short FFI typeffi_short
Size_t FFI typeffi_size_t
Get size of FFI type in bytesffi_sizeof
ssize_t FFI typeffi_ssize_t
String FFI typeffi_string
Create FFI structure typeffi_struct
Allocate array of structs from R listffi_struct_array_from_list
Create and initialize a struct from R listffi_struct_from_list
Convert struct to R listffi_struct_to_list
Get native symbol referenceffi_symbol
Create native symbol from direct addressffi_symbol_from_address
Uchar FFI typeffi_uchar
uint FFI typeffi_uint
Uint16 FFI typeffi_uint16
Uint32 FFI typeffi_uint32
Uint64 FFI typeffi_uint64
Uint8 FFI typeffi_uint8
ulong FFI typeffi_ulong
ulonglong FFI typeffi_ulonglong
Create FFI union typeffi_union
Unpack bit-fields from an integerffi_unpack_bits
Unpack bit-fields from a 64-bit valueffi_unpack_bits64
Ushort FFI typeffi_ushort
Validate FFI call prerequisitesffi_validate_call
void FFI typeffi_void
Wide char FFI typeffi_wchar_t
FFI Closure - R function as C callbackFFIClosure
FFI Type representationFFIType
Field Information ClassFieldInfo
Generate R enum definition from parsed enumgenerate_enum_definition
Generate R function wrapper from parsed functiongenerate_function_wrapper
Generate complete package from header files Generate complete package from header filesgenerate_package_from_headers
Generate .onLoad/.onUnload for packagegenerate_package_init
Generate R bindings from parsed headergenerate_r_bindings
Generate R struct definition from parsed structgenerate_struct_definition
Generate struct helper functions (allocator, from_list, to_list)generate_struct_helpers
Generate R typedef alias from parsed typedefgenerate_typedef_definition
Generate R union definition from parsed uniongenerate_union_definition
Get pointer type tagget_pointer_type
Check if pointer is NULLis_null_pointer
Check if an object is a protected SEXP pointeris_protected_ptr
Get libffi version stringlibffi_version
Create typed external pointermake_typed_pointer
Native Symbol ReferenceNativeSymbol
Convert pointer to string safelypointer_to_string
Convert pointer to string safelypointer_to_string_safe
Get the R object from a protected SEXP pointerptr_to_sexp
Manually release a protected pointerrelease_ptr
SEXP Pointer Helpers for Safe FFI Usagesexp_helpers
Get SEXP pointer from R object with GC protectionsexp_ptr
FFI Structure TypeStructType
Check if TCC is availabletcc_available
Get path to embedded TCC binarytcc_binary_path
Extract #define macros from C header file or preprocessed linestcc_extract_defines
Preprocess C header file using embedded TCCtcc_preprocess
Compile and run C code using embedded TCCtcc_run
FFI Union TypeUnionType