CFFI.memcpyandCFFI.memmovefor copying memory from one pointer to anotherCFFI.memsetto fill memory from a pointer with a single byte valueCFFI.memcmpandCFFI.memequalto compare memory from two pointers- Support for Android devices with 16KB page size
- macOS universal build for x86_64
- Updated godot-cpp to branch
godot-4.5-stable
- Support for accessing global variables with
CFFILibraryHandle.get_global CFFIType.alloc_arrayto allocate an array of valuesCFFIPointer.duplicate_arrayto duplicate more than one element from a pointer as anCFFIOwnedValueCFFIPointer.get_addressmethod to get the base address of a pointer. Useful to compare pointers by value.- Support for passing
CFFIFunctions as function pointers to struct fields or native function arguments. - Add
CFFICallableFunctionclass that wrapsCallableas native function pointers using libffi's closure API. They can be created usingCFFIScope.create_function. - Support for passing any packed array (other than PackedStringArray) as pointer to native functions.
CFFIPointer.to_*_arraymethods for copying data from pointers as other types of packed arraysStreamPeerCFFIPointerstream peer that handles a binary data stream from aCFFIPointer.
CFFIsingleton that represents the global type scope and is the entrypoint for opening native librariesCFFILibraryHandleclass representing native libraries, where native functions live- Custom ".ffilibrary" file format, which are INI files with a
[libraries]section that defines paths to native libraries separately per platform/architecture, using the exact same format as ".gdextension" files. They are imported as CFFILibrary resources. - Editor export plugin that bundles the correct native library in builds, based on the configurations from ".ffilibrary" files
- Support for built-in types like
intandfloat, pointer types likeconst char *and struct types - Instantiate FFI types using
CFFIType.alloc. The returnedCFFIOwnedValueis RefCounted and releases the memory automatically whenever it gets destroyed. - Get/set struct fields by name from
CFFIPointers - Construct
Strings andPackedByteArrays fromCFFIPointers with a single method call - Use Dictionaries as literal struct values, for example when calling a function