| docs | |
| eg | |
| cookbook | |
| libs | |
| clib.c | |
| clib.h | Header for a simple C library used in the C++ callback example |
| libA.c | A shared library that depends on another shared library (libB) |
| libB.c | A dependency library for the library dependency chain example |
| libglobals.c | A simple shared library that exports global variables for FFI testing |
| Ch01_OpaquePointers.c | Cookbook Chapter 2: Working with Bitfields |
| Ch01_OutParameters.c | Cookbook Chapter 1: Working with "Out" Parameters |
| Ch01_Pointers.c | Cookbook Chapter 1: Passing and Receiving Pointers |
| Ch01_SimpleCall.c | Cookbook Chapter 1: Calling a Simple C Function |
| Ch02_AdvancedRegistry.c | Cookbook Chapter 2: Advanced Named Types (Recursive & Forward-Declared) |
| Ch02_ArrayDecay.c | Cookbook Chapter 2: Working with Fixed-Size Arrays |
| Ch02_Bitfields.c | Cookbook Chapter 2: Working with Structs that Contain Bitfields |
| Ch02_ComplexNumbers.c | Cookbook Chapter 2: Working with Complex Numbers |
| Ch02_Enums.c | Cookbook Chapter 2: Working with Enums |
| Ch02_FlexibleArrayMembers.c | Cookbook Chapter 2: Flexible Array Members (FAM) |
| Ch02_LargeStruct.c | Cookbook Chapter 2: Large Structs Passed by Reference |
| Ch02_PackedStructs.c | Cookbook Chapter 2: Working with Packed Structs |
| Ch02_ReturnStruct.c | Cookbook Chapter 2: Receiving a Struct from a Function |
| Ch02_SIMD_AVX.c | Cookbook Chapter 2: Working with SIMD Vectors (x86-64) |
| Ch02_SIMD_NEON.c | Cookbook Chapter 2: Working with SIMD Vectors (AArch64 NEON) |
| Ch02_SIMD_SVE.c | Cookbook Chapter 2: Working with SIMD Vectors (AArch64 SVE) |
| Ch02_StructByValue.c | Cookbook Chapter 2: Small Structs Passed by Value |
| Ch02_Unions.c | Cookbook Chapter 2: Working with Unions |
| Ch03_QsortCallback.c | Cookbook Chapter 3: Creating a Type-Safe Callback for qsort |
| Ch03_StatefulCallback.c | Cookbook Chapter 3: Creating a Stateful Callback |
| Ch04_CallbackAsArg.c | Cookbook Chapter 4: Receiving and Calling a Function Pointer |
| Ch04_LongDouble.c | Cookbook Chapter 4: Handling long double |
| Ch04_Reentrancy.c | Cookbook Chapter 4: Proving Reentrancy with Nested FFI Calls |
| Ch04_ThreadSafety.c | Cookbook Chapter 4: Proving Thread Safety |
| Ch04_VariadicPrintf.c | Cookbook Chapter 4: Calling Variadic Functions like printf |
| Ch04_VTableCStyle.c | Cookbook Chapter 4: Calling a Function Pointer from a Struct |
| Ch05_CppMangledNames.c | Cookbook Chapter 5: Calling C++ Mangled Names |
| Ch05_CppTemplates.c | Cookbook Chapter 5: Interfacing with C++ Templates |
| Ch05_CppVirtualFunctions.c | Cookbook Chapter 5: Calling C++ Virtual Functions |
| Ch05_SemanticStrings.c | Cookbook Chapter 5: Handling Strings and Semantic Types |
| Ch06_GlobalVariables.c | Cookbook Chapter 6: Reading and Writing Global Variables |
| Ch06_LibraryDependencies.c | Cookbook Chapter 6: Handling Library Dependencies |
| Ch06_SystemLibraries.c | Cookbook Chapter 6: Calling Native System Libraries |
| Ch07_DynamicMarshalling.c | Cookbook Chapter 7: Dynamic Struct Marshalling |
| Ch07_DynamicSignatures.c | Cookbook Chapter 7: Building a Signature String at Runtime |
| Ch07_IntrospectWrapper.c | Cookbook Chapter 7: Introspecting a Trampoline for a Wrapper |
| Ch07_SemanticAliases.c | |
| Ch08_ArenaCallFrame.c | Cookbook Chapter 8: Building a Dynamic Call Frame with an Arena |
| Ch08_CustomAllocators.c | Cookbook Chapter 8: Using Custom Memory Allocators |
| Ch08_ManualAPI.c | Cookbook Chapter 8: The Full Manual API Lifecycle |
| Ch08_SharedArena.c | An example demonstrating the "shared arena" memory optimization |
| Ch09_ErrorReporting.c | Cookbook Chapter 9: Advanced Error Reporting for the Parser |
| Ch09_SafeExceptions.c | |
| Ch12_DirectMarshalling.c | Cookbook Chapter 12: High-Performance Language Bindings |
| test_simd.c | |
| win32_msgbox.c | |
| fuzz | |
| fuzz_abi.c | Fuzzer target for the ABI classification layer |
| fuzz_direct.c | Fuzzer target for the Direct Marshalling API generation logic |
| fuzz_helpers.c | Implements the core logic for generating random infix_type graphs from fuzzer input |
| fuzz_helpers.h | Common definitions, structures, and helpers for all fuzzer targets |
| fuzz_regression_helpers.h | Helper functions specifically for running regression tests from saved fuzzer inputs |
| fuzz_roundtrip.c | Fuzzer target for Type -> String -> Type round-trip consistency |
| fuzz_signature.c | Fuzzer target for the high-level signature parsing API |
| fuzz_trampoline.c | Fuzzer target for the trampoline generation functions, including shared arena logic |
| fuzz_types.c | Fuzzer target for the random type generation logic |
| include | |
| emit | |
| emit.h | Public API for the emit JIT code generation system |
| emit_math.h | Math operations for JIT code generation |
| infix | |
| infix.h | The public interface for the infix FFI library |
| src | |
| arch | |
| aarch64 | |
| abi_arm64.c | Implements the FFI logic for the AArch64 (ARM64) architecture |
| abi_arm64_common.h | Common register definitions and instruction encodings for the AArch64 (ARM64) architecture |
| abi_arm64_emitters.c | Implements internal helper functions for emitting AArch64 machine code |
| abi_arm64_emitters.h | |
| riscv | |
| abi_riscv64.c | Implements the FFI logic for the RISC-V RV64GC (lp64d) architecture |
| abi_riscv64_common.h | Common register definitions and instruction encodings for the RISC-V RV64GC architecture |
| abi_riscv64_emitters.c | Emits single RISC-V (RV64GC) instructions into a code_buffer |
| abi_riscv64_emitters.h | Public interface for emitting RISC-V (RV64GC) instructions |
| x64 | |
| abi_sysv_x64.c | Implements the FFI logic for the System V AMD64 ABI |
| abi_win_x64.c | Implements the FFI logic for the Windows x64 calling convention |
| abi_x64_common.h | Common register definitions for the x86-64 architecture |
| abi_x64_emitters.c | Implements internal helper functions for emitting x86-64 machine code |
| abi_x64_emitters.h | Declares internal helper functions for emitting x86-64 machine code |
| common | |
| compat_c23.h | Provides forward compatibility macros for C23 features |
| double_tap.h | A lightweight, single-header TAP (Test Anything Protocol) library |
| infix_config.h | Platform, architecture, and ABI detection macros |
| infix_internals.h | Internal data structures, function prototypes, and constants |
| platform.h | Declares internal, runtime CPU/OS feature detection functions |
| utility.h | A header for conditionally compiled debugging utilities |
| core | |
| allocator.c | The process-wide allocator table used for all of infix's internal heap allocations |
| arena.c | Implements a simple, fast arena (or region-based) allocator |
| cache.c | Implements trampoline deduplication and caching |
| error.c | Implements the thread-local error reporting system |
| loader.c | Implements cross-platform dynamic library loading |
| platform.c | Implements runtime detection of CPU and OS features |
| signature.c | Implements the infix signature string parser and type printer |
| type_registry.c | Implements the named type registry system |
| types.c | Implements the public API for creating and managing type descriptions |
| utility.c | Implements internal debugging utilities |
| emit | |
| elf | |
| emit_elf.c | ELF binary format support for emit system |
| pe | |
| emit_pe.c | PE binary format support for emit system |
| emit.c | Implementation of the emit API for generating machine code |
| emit_internals.h | Internal structures for the emit JIT code generation system |
| emit_math.c | Math operations for JIT code generation (x86-64 and ARM64) |
| jit | |
| executor.c | Implements platform-specific memory management for JIT code and execution |
| trampoline.c | The core JIT engine for generating forward and reverse trampolines |
| infix.c | The unity build source file for the infix library |
| t | |
| include | |
| types.h | Defines common C structures used across the infix test suite |
| 001_primitives.c | Unit test for creating trampolines for functions with primitive C types |
| 002_simple_calls.c | Unit test for basic forward trampoline calls with simple function signatures |
| 003_type_system_api.c | Unit test for the Manual API (infix_type_create_* functions) |
| 004_signatures.c | Unit test for the signature string parser |
| 005_layouts.c | Unit test for the Manual API's struct and union layout calculations |
| 006_end_to_end_calls.c | End-to-end unit test for passing and returning aggregate types (structs) |
| 007_type_registry.c | Unit test for the named type registry system |
| 008_registry_introspection.c | Unit test for the registry introspection and serialization APIs |
| 009_bitfields_fam.c | Unit test for Bitfields and Flexible Array Members (FAM) |
| 010_registry_scaling.c | Unit test for the registry's hash table auto-scaling (rehashing) |
| 011_bitfields.c | Unit test for bitfield support in structs |
| 101_by_value.c | Unit test for passing and returning aggregates and vectors by value |
| 102_by_reference.c | Unit test for passing and returning large aggregates by reference |
| 103_unions.c | Unit test for passing and returning unions by value |
| 105_bitfields_fam_jit.c | End-to-end JIT execution tests for Bitfields and Flexible Array Members |
| 201_basic.c | Unit test for FFI calls involving pointer types |
| 202_in_structs.c | Unit test for passing structs that contain pointer members |
| 203_complex.c | Unit test for FFI calls involving C99 _Complex types |
| 301_primitives.c | Unit test for reverse trampolines (callbacks) with primitive C types |
| 302_aggregates.c | Unit test for reverse trampolines (callbacks) with aggregate types |
| 303_advanced.c | Unit test for advanced reverse trampoline (callback) scenarios |
| 304_reverse_call_types.c | Unit test to explicitly compare the "Callback" vs. "Closure" reverse trampoline APIs |
| 305_bitfields_reverse.c | Unit test for receiving bitfield structs in reverse trampolines (callbacks) |
| 401_large_stack.c | Unit test for FFI calls with a large number of arguments passed on the stack |
| 402_variadic_functions.c | Unit test for FFI calls to and from variadic C functions |
| 403_special_types.c | Unit test for FFI calls with special, non-standard, or platform-dependent primitive types |
| 404_simd_vectors.c | Unit test for SIMD vector argument passing and return values |
| 405_simd_vectors_avx.c | Unit test for 256-bit (AVX) SIMD vector support |
| 406_simd_forward.c | Unit test for forward SIMD vector calls |
| 407_float16.c | Unit test for half-precision floating-point (float16_t) support |
| 501_direct_marshalling.c | Test suite for the high-performance direct marshalling API |
| 810_memory_stress.c | A stress test to detect memory leaks under heavy allocation/deallocation cycles |
| 811_fault_injection.c | Unit test to verify resource cleanup under memory allocation failures |
| 812_shared_arena.c | Unit test for advanced arena-based memory management features |
| 813_custom_allocator.c | Unit test for the runtime pluggable allocator API (infix_set_allocator) |
| 820_threading_helgrind.c | A stress test to detect data races and other threading issues |
| 821_threading_bare.c | A minimal, dependency-free version of the thread-safety stress test |
| 830_security.c | Unit test for security-hardening features of the infix library |
| 840_arena_allocator.c | Unit test for the internal arena allocator |
| 850_regression_cases.c | A suite of regression tests for bugs discovered by fuzzing |
| 851_lifecycle_regression.c | Regression tests for specific memory lifecycle and ownership bugs |
| 852_rax_preservation.c | Regression test to verify rax preservation across reverse trampolines |
| 860_error_handling.c | Unit test for the error reporting system |
| 861_error_reporting.c | |
| 862_packed_layout.c | Regression test for packed struct layout and by-value returns |
| 863_signature_layout_recalc.c | Regression test for layout recalculation of structs inside function signatures |
| 880_exports.c | Unit test for the dynamic library loading and symbol access API |
| 901_call_overhead.c | A micro-benchmark to measure the performance overhead of an FFI call |
| 902_cache_deduplication.c | Unit test for the trampoline deduplication (caching) system |
| 903_generation_benchmark.c | A micro-benchmark to measure the performance of trampoline generation |
| 904_registry_benchmark.c | Measures the performance of infix_register_types with many definitions |