Skip to content

package:ffigen v22.0.0

Choose a tag to compare

@liamappelbe liamappelbe released this 08 Sep 00:35
· 69 commits to main since this release
350ed45
  • Breaking change: Major overhaul of Dart config API:
    • Replace various callback based config elements with a Visitor pattern.
      • rename and renameMember replaced with .name setters on AST nodes.
      • include and includeMember replaced with .isIncluded on AST nodes.
      • Functions/Globals.includeSymbolAddress replaced with
        .exposeSymbolAddress on AST nodes.
      • Functions.includeTypedef replaced with .generateTypedefs on
        Func AST node.
      • Structs.packingOverride replaced with Struct.pack.
      • Enums.style and .silenceWarning moved to EnumClass AST node.
      • Functions.isLeaf and .recordUse moved to Func AST node.
      • Structs/Unions.dependencies moved to Struct/Union AST nodes.
      • Interfaces/Protocols.module moved to ObjCInterface/ObjCProtocol AST
        nodes.
      • Interfaces/Protocols.includeTransitive removed (always false).
      • Categories.includeTransitive replaced with
        ObjCInterface.includeCategories.
      • Typedefs.includeUnused consolidated into Typealias.isIncluded using
        TypealiasInclude enum (never, ifUsed, always).
    • Consolidate imported fields and importedTypesByUsr into
      FfiGenerator.importType, switching it to a callback pattern
    • Add importFromSymbolFile and importFromSymbolFiles utils, which load
      symbol YAML files, and return functions that can be passed directly to
      FfiGenerator.importType.
    • Replace Output.dartFile with DartOutput, to prepare for upcoming
      multi-file output format.
    • Deleted many now empty sub-config classes
    • Rename Headers to Input
    • Remove libraryImports, which was dead code
    • Remove useSupportedTypedefs, treating it as always true
    • Make preamble non-null
    • Make generate function async
  • Fix a bug in handling of
    small structs in ObjC on mac/iOS x64.
  • Fix a bug in the way that
    ObjC category methods returning instancetype are filtered.
  • Minor Objective-C code generator and function type signature fixes.
  • Bump package:code_assets dependency to ^2.0.0.