NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #360 most downloaded on pub.dev
Generator for FFI bindings, using LibClang to parse C, Objective-C, and Swift files.
Last release 4 days ago
01 Oct 2026
Release timing varies
gaps range from 2 weeks to 5 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
120 releases · first in 2020
One column per quarter.
- Release for Dart SDK >=2.14.
>=2.14.Added config key functions -> expose-typedefs to expose the typedef to Native and Dart type.
functions -> expose-typedefs to expose the typedef
to Native and Dart type.function->symbol-address no longer exposes the typedef
to Native type. Use expose-typedefs to get the native type.This package now targets package:lints for the generated code. The generated code uses C symbol names as is. Use either // ignore_for_file: lintRule1,
// ignore_for_file: lintRule1, lintRule2
in the preamble, or rename the symbols to make package:lints happy.<int> instead of _<int>.Added support for generating typedefs (_referred_ typedefs only).
typedef struct A{
...
} TA, *PA;
TA func(PA ptr);
</td> <td>
class A extends ffi.Struct {...}
typedef TA = A;
typedef PA = ffi.Pointer<A>;
TA func(PA ptr){...}
</td> </tr> </table>
Users can now specify exact path to dynamic library in llvm-path.
llvm-path.Added support for generating unions.
Release for dart sdk >=2.13 (Support for packed structs and inline arrays).
>=2.13 (Support for packed structs and inline arrays).Remove deprecated key llvm-lib from config, Use llvm-path instead.
Structs.array-workaround.llvm-lib from config, Use llvm-path instead.Added support for Packed structs. Packed annotations are generated automatically but can be overriden using structs -> pack config.
Packed structs. Packed annotations are generated
automatically but can be overriden using structs -> pack config.>=2.13.0-211.6.beta.Fix issues due to declarations having duplicate names.
char not being recognized on platforms where it's unsigned by default.Added /usr/lib to default dynamic library location for linux.
/usr/lib to default dynamic library location for linux.Deprecated config key llvm-lib.
llvm-path that accepts a list of path/to/llvm.llvm-lib.Added config key compiler-opts-automatic -> macos -> include-c-standard-library (default: true) to automatically find and add C standard library on ma
compiler-opts-automatic -> macos -> include-c-standard-library
(default: true) to automatically find and add C standard library on macOS.compiler-opts.Added new command line flag --compiler-opts to the command line tool.
--compiler-opts to the command line tool.Fix extra // or /// in comments when using comments -> style: full.
sort: true not working.// or /// in comments when using comments -> style: full.Added new subkey dependency-only (options - full (default) | opaque) under structs. When set to opaque, FFIgen will generate empty Opaque structs if s
dependency-only (options - full (default) | opaque) under structs.
When set to opaque, FFIgen will generate empty Opaque structs if structs
were excluded in config (i.e added because they were a dependency) and
only passed by reference(pointer).Fixed generation of empty opaque structs due to forward declarations in header files.
Fixed generation of duplicate constants suffixed with _ when using multiple entry points.
_<int> when using multiple entry points.Add ProtocolExtension.setupLogger , which the hooks runner calls to provide the logger used for validation diagnostics before any other method is invo
ProtocolExtension.setupLogger, which the hooks runner calls to provideHookInputUserDefines.path mangling absolute Windows paths: the driveHookInputUserDefines.baseUri, which can be used to resolve pathssymbol-address to expose native symbol pointers for functions and globals.Added Architecture.arm64e .
Architecture.arm64e.NativeLibrary.fromLookup() to support dynamic linking.2.12.0.Ignore typedef to struct pointer when possible.
Fixed illegal use of const in name, crash due to unnamed inline structs and structs having Opaque members.
const in name, crash due to unnamed inline structs and
structs having Opaque members.Switch to preview release of package:quiver.
package:quiver.Breaking change : Overrode == and hashCode in OS , Architecture , and Sanitizer to support custom targets. These objects can no longer be used as keys…
package:hooks to ^2.2.0.== and hashCode in OS, Architecture, and Sanitizer to support custom targets. These objects can no longer be used as keys of const maps and sets.
final (runtime) maps and sets instead of const, or use the string representations (e.g., OS.name, Architecture.name) as keys if const is required.package:ffigen now runs with sound null safety.Removed the need for --no-sound-null-safety flag.
--no-sound-null-safety flag.Migrated to (unsound) null safety.
Functions marked inline are now skipped.
inline are now skipped.Use Opaque for representing empty Structs.
Opaque for representing empty Structs.Add support for parsing and generating globals.
Removed the usage of --no-sound-null-safety flag.
--no-sound-null-safety flag.Removed setup phase for FFIgen. Added new optional config key llvm-lib to specify path to llvm/lib folder.
llvm-lib
to specify path to llvm/lib folder.Added support for passing and returning struct by value in functions.
Added support for Nested structs.
Added support for Dart_Handle from dart_api.h.
Dart_Handle from dart_api.h.Added Recordings.+ to combine two recordings.
Recordings.+ to combine two recordings.typedef-map can now be used to map a typedef name to a native type directly.Fixed missing typedefs nested in another typedef's return types.
Fixed issues with generating macros of type double.Infinity and double.NaN.
double.Infinity and double.NaN.Update Groovy Gradle property assignments to silence a warning.
dart format instead of dartfmt for sdk version >= 2.10.0.Fix JNI build errors on Linux arm64.
Revert an unnecessary (and breaking) KGP migration.
The YAML configuration format is deprecated and will be removed in a future release.
classes in the config file as a config errorNativeFunction parameters instead of Pointer<NativeFunction> in type signatures.Handle unimplememnted function pointers causing errors.
Fix extensions of nested types to use fully qualified generated wrapper names.
unnamed_enums.Added support for C booleans as Uint8.
dart-bool (default: true) to use dart bool instead of int in function parameters and return type.Minor changes to dylib creation error log.
Fixed parsing structs with bitfields, all members of structs with bit field members will now be removed. See #84
Fixed missing typedefs of nested function pointers.
Handle code formatting using dartfmt by finding dart-sdk.
Wrapper dynamic library version now uses FFIgen version from its pubspec.yaml file.
Fixed multiple generation/skipping of typedef enclosed declarations.
Updated package:meta version to ^1.1.8 for compatibility with flutter sdk.
package:meta version to ^1.1.8 for compatibility with flutter sdk.Fixed missing/duplicate typedef generation.
- Added FAQ to readme.
Bump ffigen and swift2objc versions.
entry-points and include-directives are now specified under headers key. Glob syntax is allowed.include/exclude config. These are now specified as a list.rename subkey.member-rename subkey. prefix and prefix-replacement subkeys have been removed.Added support for parsing macros and anonymous unnamed enums. These are generated as top level constants.
Comments config now has a style and length sub keys - style: doxygen(default) | any, length: brief | full(default), and can be disabled by passing com
style: doxygen(default) | any, length: brief | full(default), and can be disabled by passing comments: false.Handled function arguments - dart keyword name collision
pub run ffigen:setup before running the tests.Fixed wrapper not found error when running pub run ffigen.
pub run ffigen.Address pub score: follow dart File conventions, provide documentation, and pass static analysis.
Support for Functions, Structs and Enums.
array-workaround (if enabled) will generate helpers for accessing fixed size arrays in structs.size-map in config.uint8_t => Uint8), sort bindings.preamble which is included as is in the generated file.Your coding agent can read these notes before it upgrades. Set up the MCP server →