PackageTrack
Sign in Get early access

ffi

Utilities for working with Foreign Function Interface (FFI) code.

2.2.0 1000K downloads/mo #86 most downloaded on pub.dev dart-lang/native

What this package is like to depend on

Last release 6 months ago

11 Feb 2026

Release timing varies

gaps range from 2 weeks to 11 months

Nearly every release is documented

notes for 20 of 21 stable releases

1 version withdrawn

withdrawn after publishing

7 years old

32 releases · first in 2019

2 releases in the last 12 months

see the full history below

Release timeline

32 releases · Sep 2019 to Feb 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 32
  1. 2.2.0 11 Feb 2026
    Release notes
    • Add ProtocolExtension.setupLogger, which the hooks runner calls to provide
      the logger used for validation diagnostics before any other method is invoked
      on the extension.
    • Fix HookInputUserDefines.path mangling absolute Windows paths: the drive
      letter was parsed as a URI scheme. Absolute paths are now returned as-is;
      relative paths are resolved against the source of the path.
    • Add HookInputUserDefines.baseUri, which can be used to resolve paths
      from nested user-defined options.
    Open source →
    Release notes
    • Export leaked types.
    Open source →
  2. 2.1.5 07 Jan 2026
    Release notes
    • Update to the latest lints.
    • Add default parameter names for callbacks.
    Open source →
  3. 2.1.4 17 Feb 2025
    Release notes
    • Require Dart 3.7.0 or greater to opt in to tall style formatting.
    Open source →
  4. 2.1.3 12 Aug 2024
    Release notes
    • Use package:dart_flutter_team_lints.
    • Migrate from DynamicLibrary.process() to @Native external functions. https://github.com/dart-lang/native/issues/1401
    Open source →
  5. 2.1.2 17 Jan 2024
    Release notes
    • Update repository to point to dart-lang/native.
    Open source →
  6. 2.1.1 15 Jan 2024
    Release notes
    • Require Dart 3.3.0 or greater.
    • Migrate elementAt use to operator +.
    Open source →
  7. 2.1.0 08 Aug 2023
    Release notes
    • Require Dart 3.0.0 or greater.
    • Expose native equivalent to free (nativeFree) from malloc and calloc allocators.
    Open source →
  8. 2.0.2 09 May 2023
    Release notes
    • Fixed a typo in a doc comment.
    • Added package topics to the pubspec file.
    Open source →
  9. 2.0.1 19 Jun 2022
    Release notes
    • Only zero out memory on successful allocation on Windows.
    • Upgrade test dev dependency.
    Open source →
  10. 2.0.0 27 May 2022
    Release notes
    • Validate bundled dynamic libraries by reading their header: when the file is
      a recognized ELF, Mach-O, or PE binary, check that it was built for the
      target architecture. Reject multi-architecture Mach-O output because hooks
      run once per target architecture. A file the built-in validators do not
      recognize, or a recognized library built for an architecture they do not
      know, warns on the supplied logger instead of failing.
    • Bump the dependency on package:hooks to ^2.2.0.
    • Breaking change: Overrode == 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.
      • Migration: Use 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.
    • Support custom target OS, architecture, and santizer in protocol extension.
    Open source →
    Release notes
    • Switch Windows memory allocation to use CoTaskMemAlloc and CoTaskMemFree, which will enable support for NativeFinalizer.
    • Require Dart 2.17.0 or greater.
    Open source →
  11. 1.2.1 13 May 2022
    Release notes

    Revert added common C integer types as ABI-specific integers. Instead, these are available in Dart 2.17.

    Open source →
  12. 1.2.0 03 Feb 2022 withdrawn
    Release notes

    This release requires Dart 2.16.0 or greater.

    Open source →
  13. 1.2.0-dev.0 20 Jan 2022 pre-release
    Release notes

    Added common C integer types as ABI-specific integers. These common C integer types will make their way into dart:ffi in 2.17 and be deprecated from this package. Having them in this package enables using them in Dart 2.16.

    This pre-release requires Dart 2.16.0-118.0.dev or greater.

    Open source →
  14. 1.1.2 04 Jun 2021
    Release notes

    Fixed unhandled exception in withZoneArena (#107).

    Open source →
  15. 1.1.1 27 May 2021
    Release notes
    • Fix quadratic deserialization performance and index corruption in
      Recordings.fromJson.
    Open source →
    Release notes

    Adds a sanity check to Pointer<Utf8> and Pointer<Utf16> extension methods that receiver is not nullptr.

    Open source →
  16. 1.1.0 25 May 2021
    Release notes
    • Added Recordings.+ to combine two recordings.
    Open source →
    Release notes

    Adds the arena allocator.

    Moves from static analysis with lints in package:pedantic to package:lints.

    Open source →
  17. 1.0.0 11 Feb 2021
    Release notes

    Bumping the version of this package to 1.0.0.

    Removes all deprecated methods, use 0.3.0-nullsafety.3 for migration.

    Open source →
  18. 0.3.1-nullsafety.0 11 Feb 2021 pre-release
    Release notes

    Deprecates the static methods on Utf8 and Utf16 and introduces extension methods to replace them.

    Open source →
  19. 0.3.0-nullsafety.3 10 Feb 2021 pre-release
    Release notes

    Adds back in deprecated allocate and free to ease migration. These will be removed in the next release.

    This pre-release requires Dart 2.12.0-259.9.beta or greater.

    Open source →
  20. 0.3.0-nullsafety.2 09 Feb 2021 pre-release

    Nothing published for this version

  21. 0.3.0-nullsafety.1 03 Feb 2021 pre-release
    Release notes

    This pre-release requires Dart 2.12.0-259.8.beta or greater.

    Note that this pre-release does not work in Flutter versions containing Dart 2.12.0-260.0.dev - 2.12.0-264.0.dev. Using Allocator.call throws a NoSuchMethodError in these versions. See Flutter Engine #23954 for more info.

    Open source →
  22. 0.3.0-nullsafety.0 01 Feb 2021 pre-release
    Release notes

    Changes Utf8 and Utf16 to extend Opaque instead of Struct. This means .ref is no longer available and Pointer<Utf(..)> should be used. See breaking change #44622 for more info.

    Removes allocate and free. Instead, introduces calloc which implements the new Allocator interface. See breaking change #44621 for more info.

    This pre-release requires Dart 2.12.0-265.0.dev or greater.

    Open source →
  23. 0.2.0-nullsafety.1 18 Nov 2020 pre-release
    Release notes

    Adds an optional named length argument to Utf8.fromUtf8().

    Open source →
  24. 0.2.0-nullsafety.0 16 Nov 2020 pre-release
    Release notes

    Pre-release (non-stable) release supporting null safety. Requires Dart 2.12.0 or greater.

    Open source →
  25. 0.1.3 05 Nov 2019
    Release notes

    Stable release incorporating all the previous dev release changes.

    Bump SDK constraint to >= 2.6.0.

    Open source →
  26. 0.1.3-dev.3 15 Oct 2019 pre-release
    Release notes

    Replace use of deprecated asExternalTypedData with asTypedList.

    Open source →
  27. 0.1.3-dev.1 10 Oct 2019 pre-release
    Release notes
    • Adds top-level allocate<T>() and free() methods which can be used as a replacement for the deprecated Pointer.allocate<T>() and Pointer.free() members in dart:ffi.
    Open source →
  28. 0.1.2 10 Oct 2019

    Nothing published for this version

  29. 0.1.1 09 Sep 2019
    Release notes
    • Add basic Utf16 support
    Open source →
  30. 0.1.1+1 10 Oct 2019
    Release notes
    • Fix documentation link
    Open source →
  31. 0.1.1+2 10 Oct 2019
    Release notes
    • Expand readme
    Open source →
  32. 0.1.0 09 Sep 2019
    Release notes
    • Initial release supporting Utf8
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive