infix
A JIT-Powered FFI Library for C
|
The primary public-facing functions for using the infix library. More...
Modules | |
High-Level Signature API | |
Recommended functions for creating trampolines from a signature string. | |
Manual Type-Creation API | |
Advanced functions for manually building infix_type objects. | |
Named Type Registry API | |
Functions for defining, managing, and using a registry of named types. | |
Type System | |
Structures and functions for describing C data types. | |
Introspection API | |
Functions for querying the properties of trampolines and types. | |
Memory Management | |
The arena allocator and configurable memory functions. | |
Error Reporting | |
Public structures and enumerations for detailed error reporting. | |
Dynamic Library & Globals API | |
Functions for interacting with shared libraries and their global variables. | |
Version Information | |
Macros defining the semantic version of the infix library. | |
Dynamic Library API | |
Functions for loading shared libraries and looking up symbols. | |
Typedefs | |
typedef void(* | infix_unbound_cif_func) (void *, void *, void **) |
The signature for a generic "unbound" forward-call trampoline. | |
typedef void(* | infix_cif_func) (void *, void **) |
The signature for a "bound" forward-call trampoline. | |
typedef void(* | infix_closure_handler_fn) (infix_context_t *context, void *return_value, void **args) |
The signature for a generic "closure" handler. | |
Enumerations | |
enum | infix_status { INFIX_SUCCESS = 0 , INFIX_ERROR_ALLOCATION_FAILED , INFIX_ERROR_INVALID_ARGUMENT , INFIX_ERROR_UNSUPPORTED_ABI , INFIX_ERROR_LAYOUT_FAILED , INFIX_ERROR_PROTECTION_FAILED , INFIX_ERROR_ } |
An enumeration of all possible success or failure codes from the public API. More... | |
The primary public-facing functions for using the infix library.
typedef void(* infix_cif_func) (void *, void **) |
The signature for a "bound" forward-call trampoline.
This is the function pointer type returned by infix_forward_get_code
. The target function is hardcoded, so it is not needed as an argument at the call site.
return_value | A pointer to a buffer where the return value will be stored. |
args | An array of pointers, where each element points to an argument's value. |
int add(int a, int b)
typedef void(* infix_closure_handler_fn) (infix_context_t *context, void *return_value, void **args) |
The signature for a generic "closure" handler.
This function pointer type is used with infix_reverse_create_closure
. It is a low-level handler ideal for language bindings, receiving all arguments in a generic void**
array for manual marshalling.
context | The context handle of the invoked callback. |
return_value | A pointer to a buffer where the handler must write the return value. |
args | An array of pointers to the arguments passed by the native caller. |
typedef void(* infix_unbound_cif_func) (void *, void *, void **) |
The signature for a generic "unbound" forward-call trampoline.
This is the function pointer type returned by infix_forward_get_unbound_code
. It provides a standardized way to invoke any C function for which a trampoline was generated.
target_function | A pointer to the native C function to be called. |
return_value | A pointer to a buffer where the return value will be stored. |
args | An array of pointers, where each element points to an argument's value. |
enum infix_status |
An enumeration of all possible success or failure codes from the public API.