# ffi

> Utilities and a binding generator for calling C from Dart through FFI

Source: https://talira.ai/catalog/ffi-twrxpgxn
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [developer tools / language bindings](https://talira.ai/categories/developer-tools/language-bindings), [languages / dart](https://talira.ai/categories/languages/dart)
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Backed by: [Google](https://talira.ai/orgs/google.md)
- Funding: public company (NASDAQ:GOOGL)[^3]

ffi is the Dart team's package of utilities for working with Dart's Foreign Function Interface: allocating and freeing native memory and converting strings to and from native UTF-8 and UTF-16. Its companion ffigen, from the same repository, generates Dart FFI bindings by parsing C, Objective-C and Swift headers with LibClang, so a Dart or Flutter app can call a native library without writing the bindings by hand. Both are BSD-3-Clause and published on pub.dev.

## Links

- GitHub: https://github.com/dart-lang/native
- Docs: https://pub.dev/documentation/ffi/latest/

## Problems it solves

- call a C library from my Flutter app
- generate Dart bindings for a native library instead of writing them by hand
- pass strings between Dart and native code

## Features

- native memory allocation for Dart FFI
- UTF-8 and UTF-16 string conversion to and from native code
- ffigen: generate Dart bindings from C, Objective-C and Swift headers with LibClang

## Limitations

- ffigen parses C headers only, not C++ headers[^1]

## Trust

Overall: 0.64 out of 1.
Signals: maintenance 1.00, adoption 0.49, momentum 0.26, community 0.82, backing 0.55, extensibility 0.00.

- last commit 4 days ago
- 130 commits in the last 90 days
- latest release jnigen-v1.1.1 5 days ago
- 281 GitHub stars
- 111 contributors
- backed by Google
- funding: public company (NASDAQ:GOOGL)

## Alternatives

- [flutter_rust_bridge](https://talira.ai/catalog/flutter-rust-bridge-5cp1d45d.md): Call Rust code from Flutter and Dart, with the glue code generated for you

## Sources

[^1]: https://github.com/dart-lang/native/blob/main/pkgs/ffigen/README.md (checked 26 Nov 2026)
[^2]: https://github.com/dart-lang/native/blob/main/pkgs/ffi/LICENSE (checked 26 Nov 2026)
[^3]: https://www.sec.gov/files/company_tickers_exchange.json (checked 20 Nov 2026)
