Skip to content
CAI
Software that uses CAICheck a score

fzyzcjy/flutter_rust_bridge

43.5

Weak · 23 October 2026

88.1k

lines of production code

Rust

with C, Dart, C++

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

FlutterRustBridge is a framework that generates Dart bindings for Rust code to enable seamless interoperability between the two languages. It provides code generation tools, runtime libraries, and build integrations like Cargokit to support cross-platform applications on Android, iOS, macOS, Windows, and Linux. The system also includes developer utilities for testing, CI workflows, and web development to streamline the creation of hybrid Dart-Rust projects.

How it got here

2021–2023 — FlutterRustBridge v2 architecture and WebAssembly support

167 changes.

This period focused on the foundational development of FlutterRustBridge v2, establishing a monorepo structure and a modular code generation pipeline based on a new Intermediate Representation (MIR). Significant effort was dedicated to implementing comprehensive WebAssembly support, including platform-specific Dart runtimes, generalized isolate communication, and WASM module initialization. The work also introduced a new codec framework (CST, DCO, SSE) and expanded the project with extensive examples, benchmarks, and integration scaffolding for all major platforms.

2024 — HIR/MIR refactoring and PDE codec

84 changes.

The code generator underwent a major structural overhaul, introducing a new Mid-level IR (MIR) and refining the High-level IR (HIR) to support a new Packed Data Encoding (PDE) codec for FFI dispatching. This period also saw the addition of comprehensive example projects, including pure Dart, third-party integration, and Rust-backed UI demos, alongside fixes for ffigen 21 compatibility and configuration parsing.

2025–2026 — Native assets integration and platform expansion

31 changes.

This period focused on implementing the Native Assets build backend, replacing the legacy CargoKit approach with a new hooks-based system for Rust compilation. It also expanded platform support by adding native scaffolding for Linux and OpenHarmony, while introducing Rust-to-Dart logging and constant getter generation in the code generator.

Features

Add Apple scaffold source of truth and sanitizer suppression files

The tools directory now includes the definitive Apple scaffold assets under \tools/frb\_internal/assets/apple\_scaffold\, providing the complete iOS project structure (including \SceneDelegate.swift\, Xcode project files, and metadata) used for generation. Additionally, new sanitizer suppression files (\dart\_lsan\_cst.supp\, \dart\_tsan\_pde.supp\, \dart\_tsan\_pure.supp\, \dart\_valgrind.supp\) have been added to suppress known memory leaks and thread-safety issues in the pure Dart and PDE test workloads.

tools · high confidence

Add CMake build integration for Rust libraries via Cargokit

This change introduces the Cargokit CMake integration files, enabling Flutter projects to build and link Rust libraries using CMake. The new \cargokit.cmake\ script provides an \apply\_cargokit\ function that configures custom build commands to invoke the Cargokit build tool, handling platform-specific logic for Windows, Android, and OpenHarmony (ohos), including symlink resolution on Windows via a new \resolve\_symlinks.ps1\ helper. This allows developers to integrate Rust FFI libraries into their Flutter apps through standard CMake build systems.

_frb\_example/flutter\_via\_integrate/rust\builder/cargokit/cmake · high confidence

Add Cargokit integration for building Rust libraries in Flutter plugins

The \rust\_builder\ directory now includes the Cargokit tooling and platform-specific build configurations (Android, iOS, macOS, Linux, Windows) required to seamlessly integrate Rust code into Flutter plugins. This change adds the necessary CMake scripts, shell/PowerShell build runners, and Dart build tool wrappers that allow the Flutter build system to compile Rust crates and bundle the resulting native libraries for all supported platforms.

_frb\_example/rust\_ui\_counter/ui/rust\builder · high confidence

Add DCO decoder generation for Dart API types

The code generator now produces specific \dco\decode\\<type\>\ methods for Dart API implementation classes. This change introduces a new decoder module that iterates over the middle-end representation (MirType) to generate decoding logic, including simple type casts and codec comments, ensuring that data received via the DCO protocol is correctly deserialized into the corresponding Dart API types.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/dco/decoder · high confidence

Add Dart C Object conversion implementation for IO and Web platforms

The library now includes a new implementation for converting Dart C objects into native Dart types. This change introduces \\_io.dart\ to handle the conversion logic for native environments (supporting types like null, bool, int, double, string, array, and typed data) and \\_web.dart\ as a placeholder for web environments. The main entry point \dart\_c\_object\_into\_dart.dart\ uses conditional exports to select the appropriate implementation based on whether \dart.library.js\_interop\ is available, ensuring the correct platform-specific code is used at runtime.

_frb\_dart/lib/src/dart\_c\_object\_into\dart · high confidence

Add Dart CObject (DCO) codec for decoding Rust-to-Dart bindings

The code generator now supports the Dart CObject (DCO) codec for the Dart side of the wire protocol. This change introduces a new codec entry point that generates Dart bindings specifically for decoding data coming from Rust, while explicitly suppressing encoding support (which remains unavailable for this codec). The implementation includes the necessary generator context, decoder logic, and unit tests to verify that primitive types like \int\ are correctly decoded via generated methods such as \dco\_decode\_i\_32\.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/dco · high confidence

Add Dart CST encoder generation for API-to-wire conversion

The code generator now produces Dart API implementation methods for encoding values from the API layer to the wire layer. Specifically, it generates \cst\encode\\<type\>\ functions for serializing types and \cst\_api\_fill\_to\wire\\<type\>\ methods that handle the conversion of API objects into wire objects, with specific handling for optional types and target-specific wire types (distinguishing between IO and Web targets).

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/cst/encoder · high confidence

Add Flutter foundation serialization buffers for Int64 and platform-specific data handling

The \frb\_dart\ library now includes \ReadBuffer\ and \WriteBuffer\ classes, adapted from Flutter's foundation serialization, to handle complex data types like Int64 and Uint64 via BigInt. These buffers support reading and writing various integer and float types (Int8/16/32/64, Uint8/16/32/64, Float32/64) and lists thereof. The implementation uses platform-specific extensions (\\_io.dart\ for native, \\_web.dart\ for web) to correctly map \PlatformInt64\ to \getInt64\/\putInt64\ on IO and \getBigInt64\/\putBigInt64\ on web, ensuring compatibility with Dart2js. The \WriteBuffer\ also utilizes \BaseGeneralizedUint8List\ for efficient memory management and resizing.

_frb\_dart/lib/src/third\party · high confidence

Add Mandelbrot set generation example

The gallery example now includes a Rust implementation for generating Mandelbrot set images. This adds a new \mandelbrot\ API module that exposes an async \draw\_mandelbrot\ function, accepting image dimensions, zoom coordinates, scale, and thread count to produce a PNG image. The implementation uses \flutter\_rust\_bridge\ version 2.14.0-beta.2 for code generation and leverages \spawn\_blocking\_with\ to parallelize the rendering across multiple threads.

_frb\example/gallery/rust · high confidence

Add OpenHarmony (ohos) platform support to integration templates

The integration templates for both app and plugin projects now include the necessary build configuration files to support OpenHarmony. This addition includes CMake build scripts, Hvigor build files, module manifests, and obfuscation rules, enabling Rust libraries to be built and linked for OpenHarmony devices alongside existing platforms like Android, iOS, Linux, macOS, and Windows.

_frb\_codegen/assets/integration\template/cargokit · high confidence

Add Rust bindings for Web Audio API third-party integration

The \frb\_example/integrate\_third\_party/rust\ directory now contains the generated Rust source code for integrating the \web\_audio\_api\ crate via Flutter Rust Bridge. This includes the \frb\_generated.rs\ bridge file (generated by \flutter\_rust\_bridge\ version 2.14.0-beta.2), API definitions for \MyMediaElement\ and \AudioContext\ overrides in \src/api/\, and module declarations for \web\_audio\_api\ contexts, nodes, and worklets in \src/third\_party/\.

_frb\_example/integrate\_third\party/rust · high confidence

Add dart\_minimal example for flutter\_rust\_bridge

A new minimal example project has been added to demonstrate the \flutter\_rust\_bridge\ integration. It includes the generated Dart bindings (version 2.14.0-beta.2), a configuration file (\flutter\_rust\_bridge.yaml\), and a \main.dart\ entry point that initializes the Rust library and calls a simple \minimalAdder\ function, providing a reference implementation for users.

_frb\_example/dart\minimal · high confidence

Add flat HIR parsers for Rust items (structs, enums, traits, impls, functions, constants, type aliases)

The codegen now includes a new flat HIR parser module that converts Rust \syn\ items into a flat intermediate representation. It handles structs, enums, traits, inherent and trait implementations, free functions, and constants, preserving namespace, visibility, and source metadata. Type aliases are supported only when they contain exclusively type parameters (no lifetimes, const generics, or where clauses), ensuring safe generic substitution. Constants are parsed conditionally based on a configuration flag. Unit tests verify correct metadata preservation, trait implementation recording, and alias filtering.

_frb\_codegen/src/library/codegen/parser/hir/flat/parser/syn\item · high confidence

Add flutter\_package\_native\_assets example project scaffolding

The \flutter\_package\_native\_assets\ example project has been added, providing a complete scaffold for a Flutter application that integrates Rust native assets via \flutter\_rust\_bridge\. This includes the package structure (Rust crate, build hook, Dart API), an example app with integration tests verifying the bridge, and platform-specific configurations for iOS (Xcode project, Swift delegates), Linux (CMake build files), and Android (Gradle wrapper).

_frb\_example/flutter\_package\_native\assets · high confidence

Add generalized 64-bit typed data support for BigInt

Introduces \Int64List\ and \Uint64List\ classes in the \generalized\_typed\_data\ library that wrap native typed data arrays but expose elements as \BigInt\ to handle 64-bit integers safely. The implementation provides platform-specific backends: \\_io.dart\ uses native \dart:typed\_data\ for efficient memory access on native platforms, while \\_web.dart\ implements a JavaScript-compatible fallback using \ByteData\ with manual 32-bit chunking to support 64-bit operations in the browser. This enables users to work with large integers in typed data structures without overflow risks, with automatic conversion between \int\ and \BigInt\ as needed.

_frb\_dart/lib/src/generalized\_typed\data · high confidence

Add naive flat HIR parser with module flattening logic

Introduces a new parser module that converts hierarchical HIR tree packs into a flat list of items. The implementation recursively traverses nested modules, flattening their items into a single vector while preserving metadata such as namespace, generation source, and public visibility. A unit test verifies that nested module structures are correctly flattened and that item metadata is accurately maintained during the process.

_frb\_codegen/src/library/codegen/parser/hir/naive\flat/parser · high confidence

Add public-use flattening transformer for HIR modules

The code generation parser now includes a new transformer that processes \pub use\ statements within the High-Level Intermediate Representation (HIR). This component recursively traverses module trees and, for third-party crates, re-exports public items (structs, enums, types, functions, traits) from nested modules into their parent modules. This flattening ensures that public API items are accessible via their expected namespaces without requiring users to navigate deep module paths.

_frb\codegen/src/library/codegen/parser/hir/tree/transformer · high confidence

Add raw HIR parsing entry point with feature flag support

The codegen parser now includes a new \parse\ function in the raw HIR module that constructs a \HirRawPack\ by expanding Rust crates via \cargo\_expand\. This implementation supports selecting specific feature flags for code generation through the \config.rust\_features\ parameter, allowing users to control which Rust features are enabled during the parsing of both the self-crate and third-party crates.

_frb\codegen/src/library/codegen/parser/hir/raw · high confidence

Added CMake integration for Rust library builds via Cargokit

The build system now includes Cargokit CMake scripts to integrate Rust libraries into Flutter projects. This adds a new \cargokit.cmake\ module that defines the \apply\_cargokit\ function, enabling CMake to build Rust code and link the resulting libraries to C++ targets. It also adds a PowerShell script (\resolve\_symlinks.ps1\) to correctly resolve symlinks on Windows, addressing a known CMake limitation. This change allows developers to use CMake-based build flows for Flutter apps that depend on Rust code.

_frb\_example/flutter\_via\_create/rust\builder/cargokit/cmake · high confidence

Added Cargokit build infrastructure for Flutter-Rust integration

The cargokit directory now includes the necessary build scripts (build\_pod.sh, run\_build\_tool.sh, run\_build\_tool.cmd), configuration files, and licensing information to support building Rust code within Flutter plugins. This addition enables the seamless integration of Cargo builds with Flutter's build system for iOS and Android platforms, providing the glue code required to compile Rust dependencies as part of the Flutter plugin lifecycle.

_frb\_example/flutter\package/cargokit · high confidence

Added Cargokit build scripts and configuration files

The \cargokit\ directory now includes the necessary build infrastructure for integrating Rust code with Flutter plugins. This adds the \build\_pod.sh\, \run\_build\_tool.sh\, and \run\_build\_tool.cmd\ scripts which handle the compilation of Rust components for iOS/macOS and general Dart tool execution. Additionally, \.gitignore\, \LICENSE\, and \README\ files have been added to manage version control, licensing (MIT/Apache 2.0), and documentation for this integration layer.

_frb\_example/flutter\_via\_create/rust\builder/cargokit · high confidence

Added Cargokit integration for building Rust libraries on all Flutter platforms

The \frb\_example/integrate\_third\_party/rust\_builder\ directory now includes the full Cargokit toolchain, enabling the seamless integration of Rust code into Flutter plugins across Android, iOS, macOS, Linux, and Windows. This change adds the necessary build scripts (including \build\_pod.sh\ for iOS/macOS and \cargokit.cmake\ for CMake-based platforms), platform-specific CMake configurations, and Dart build tool runners to automatically compile Rust crates during the Flutter build process. It also includes standard project scaffolding such as \.gitignore\ files and license headers to support this native build integration.

_frb\_example/integrate\_third\_party/rust\builder · high confidence

Added Cargokit integration scaffolding for Rust-Flutter builds

The rust\_builder location now includes the Cargokit glue code required to build Rust libraries within Flutter projects. This adds platform-specific build configurations (CMake for Linux/Windows, shell scripts for macOS/iOS, and Gradle integration for Android) along with the necessary Dart build tool and license files, enabling the gallery example to compile and bundle Rust code on all supported platforms.

_frb\_example/gallery/rust\builder · high confidence

Added Cargokit integration scripts for Rust build automation

The \frb\_example/flutter\_via\_integrate/rust\_builder/cargokit\ directory now includes the Cargokit tooling files, including shell and batch scripts (\build\_pod.sh\, \run\_build\_tool.sh\, \run\_build\_tool.cmd\) that automate the compilation of Rust code into Flutter plugins. This addition provides the necessary glue code to seamlessly integrate Cargo builds with the Flutter build system for iOS, macOS, and Android, along with the associated license and documentation files.

_frb\_example/flutter\_via\_integrate/rust\builder/cargokit · high confidence

Added HIR tree parser for crates, modules, and packs

The codebase now includes a new hierarchical intermediate representation (HIR) tree parser located in \frb\_codegen/src/library/codegen/parser/hir/tree/parser\. This addition introduces logic to parse Rust source files into a structured tree format, specifically handling the parsing of individual crates (\crates.rs\), recursive module structures including visibility and ignore attributes (\module.rs\), and the aggregation of raw crates into a pack (\pack.rs\). The implementation ensures that inline modules are correctly nested and that modules marked with \\#\[frb(ignore)\]\ are skipped during the tree construction process.

_frb\codegen/src/library/codegen/parser/hir/tree/parser · high confidence

Added HIR tree parsing module

A new module at \frb\_codegen/src/library/codegen/parser/hir/tree\ has been introduced to handle the parsing of the High-Level Intermediate Representation (HIR) tree. This module exposes a \parse\ function that orchestrates the conversion of raw HIR data into a structured tree pack, applying a \pub\_use\_transformer\ step along the way and dumping intermediate states for debugging.

_frb\codegen/src/library/codegen/parser/hir/tree · high confidence

Added Linux and Windows Flutter build scaffolding

The Linux and Windows platform directories now include the standard Flutter engine integration files. This adds CMake build configurations for linking the Flutter library and C++ wrappers, along with generated plugin registrant headers and source files that initialize the Flutter engine and register plugins (including the \rust\_lib\_flutter\_via\_integrate\ FFI plugin) on these desktop platforms.

_frb\_example/flutter\_via\_create/linux/flutter, frb\_example/flutter\_via\_create/windows/flutter, frb\_example/flutter\_via\_integrate/linux/flutter, frb\_example/flutter\_via\integrate/windows/flutter · high confidence

Added Linux runner source files and CMake build configuration

The Linux runner directory now includes the CMakeLists.txt build script and the C++ source files (main.cc, my\_application.cc, my\_application.h) required to build the Flutter application on Linux. This change establishes the native Linux entry point, configuring the GTK window, header bar behavior, and plugin registration for the example app.

_frb\_example/flutter\_via\integrate/linux/runner · high confidence

Added OpenHarmony (OHOS) scaffold for the flutter\_via\_create example

The flutter\_via\_create example now includes the necessary build configuration and source files to support OpenHarmony. This addition introduces the OHOS-specific project structure, including CMake build scripts, Hvigor plugin configuration, module manifests, and dependency definitions, enabling the example to be built and integrated on OpenHarmony devices.

_frb\_example/flutter\_via\_create/rust\builder/ohos · high confidence

Added Rust UI Todo List example project

Introduced a new example application demonstrating Flutter as a Rust UI, featuring a todo list with add, remove, and toggle capabilities. The project includes the Rust backend logic in \src/app.rs\ using \flutter\_rust\_bridge\ (generated code at version 2.14.0-beta.2) and a complete Flutter frontend structure for Android, iOS, Linux, and other platforms.

_frb\_example/rust\_ui\_counter, frb\_example/rust\_ui\_todo\list · high confidence

Added Rust-to-Dart logging bridge example in dart\_build\_rs

The \frb\_example/dart\_build\_rs/rust\ location now includes a complete example demonstrating how to use the Flutter Rust Bridge logging bridge. The \build.rs\ script configures opinionated logging, while the \src/api/minimal.rs\ module enables the Rust-to-Dart logging feature and exposes an \emit\_log\_message\ function. The generated \frb\_generated.rs\ file includes the necessary wire functions (\frb\_internal\_init\_logger\, \frb\_internal\_dispose\_logger\, etc.) to handle log messages from Rust to Dart, allowing users to see Rust logs in their Dart/Flutter application.

_frb\_example/dart\_build\rs/rust · high confidence

Added Scoop package manifest and generation script for flutter\_rust\_bridge\_codegen

Users can now install the flutter\_rust\_bridge\_codegen tool via the Scoop package manager on Windows. This change introduces a new JSON manifest file (flutter\_rust\_bridge\_codegen.json) defining the package for version 2.14.0-beta.2, along with a shell script (scoop.json.sh) that automates the generation of this manifest by fetching version details and checksums from GitHub releases.

_frb\codegen/contrib · high confidence

Added WASM experiment page and build artifact ignore rule

The web directory now includes a .gitignore rule to exclude generated JavaScript build artifacts (main.dart.js\*) and a new HTML page (experiment\_call\_wasm\_from\_js.html) that demonstrates calling Rust WASM from JavaScript, including a note on testing CORS policies by opening the page from a different origin.

_frb\_example/dart\minimal/web · high confidence

Added Windows desktop runner for the Flutter UI

The Windows desktop target is now available for the \frb\_example\_rust\_ui\_counter\ application. This change introduces the complete CMake build configuration, the Win32 window host implementation (including DPI scaling and dark mode support), and the entry point that initializes the Flutter engine and registers the Rust FFI plugin, enabling users to build and run the counter example on Windows.

_frb\_example/rust\_ui\counter/ui/windows · high confidence

Added Windows native runner for the third-party integration example

The Windows platform support for the \frb\_example\_integrate\_third\_party\ application has been added, enabling the example to be built and run on Windows. This includes the CMake build configuration, a Win32 window implementation with high-DPI and dark-mode support, and the necessary glue code to host the Flutter engine and register the Rust FFI plugin.

_frb\_example/integrate\_third\party/windows · high confidence

Added build script for pure\_dart\_pde example

A new build script (build.dart) has been added to the pure\_dart\_pde example, enabling the build process to run with the 'internal\_feature\_for\_testing' feature flag enabled.

_frb\_example/pure\_dart\pde/hook · high confidence

Added deliberate bad behavior example binary

The entry point for the \frb\_example\_deliberate\_bad\ package has been created, providing a CLI tool that demonstrates various memory safety issues. Users can now run specific scenarios via command-line arguments, including Dart-only heap use-after-free and memory leaks, as well as Rust-invoked issues such as stack buffer overflows, heap use-after-free, uninitialized value usage, memory leaks, and data races.

_frb\_example/deliberate\bad/bin · high confidence

Added deliberate bad code example for memory safety testing

The \frb\_example/deliberate\_bad/rust\ crate now includes intentionally unsafe Rust functions designed to trigger memory safety issues (stack buffer overflow, heap use-after-free, uninitialized value usage, memory leaks, and data races). These functions are exposed via the Flutter Rust Bridge API and can be invoked from Dart or run directly via CLI arguments, serving as a testbed for sanitizers and memory safety analysis tools.

_frb\_example/deliberate\bad/rust · high confidence

Added deliberate\_bad example for sanitizer testing

The \frb\_example/deliberate\_bad\ directory now contains a dedicated example project designed to test sanitizers by intentionally triggering memory safety issues. This example includes generated Dart bindings (via flutter\_rust\_bridge 2.14.0-beta.2) for Rust functions that induce stack buffer overflows, heap use-after-free, uninitialized value usage, memory leaks, and data races. It also provides the necessary configuration files (\flutter\_rust\_bridge.yaml\, \analysis\_options.yaml\) and build scripts to facilitate this testing purpose.

_frb\_example/deliberate\bad · high confidence

Added example apps for native assets integration

New example applications have been added for the \flutter\_package\_native\_assets\, \flutter\_via\_create\_native\_assets\, and \flutter\_via\_integrate\_native\_assets\ packages. These examples provide a functional Flutter UI that initializes the Rust library and calls the \greet\ function, along with the necessary Android configuration files (manifests, activities, and themes) to support native asset integration on Android.

_frb\_example/flutter\_package\_native\_assets/example, frb\_example/flutter\_via\_create\_native\_assets/android, frb\_example/flutter\_via\_integrate\_native\assets/android · high confidence

Added file-system watcher controller for code generation

The code generation process now supports an automatic watch mode that monitors specified directories for file changes and re-runs the generator accordingly. This new controller module introduces a debounced file-system watcher (using the \notify\ crate) with a 300ms debounce interval to prevent excessive re-runs, supports excluding specific paths from monitoring, and allows limiting the total number of re-runs via a \max\_count\ configuration. Users can enable this behavior through the \ControllerInternalConfig\ to keep generated code in sync with source changes without manual intervention.

_frb\codegen/src/library/codegen/controller · high confidence

Added iOS project scaffolding for the Rust UI Counter example

The iOS directory for the \frb\_example/rust\_ui\_counter\ now includes the complete Xcode project structure required to build and run the application on iOS devices. This change introduces the \Runner\ target configuration, including the \AppDelegate.swift\ for plugin registration, standard iOS storyboards for the launch and main screens, asset catalogs for app icons and launch images, and the necessary \Info.plist\ and build configurations. It also sets up the Xcode workspace and scheme, enabling developers to open and compile the iOS portion of the example directly.

_frb\_example/rust\_ui\counter/ui/ios · high confidence

Added intermediate representation structures for code generation skip logic

The code generation system now includes new IR types to explicitly model and categorize why certain functions or types are skipped during binding generation. This introduces the \IrSkip\ struct and \IrSkipReason\ enum, which define specific reasons for exclusion (such as functions not being public, generic arguments, or missing trait definitions) and provide human-readable explanations for each. Additionally, the \IrValueOrSkip\ helper type and its \split\ method are added to facilitate separating valid code generation targets from skipped items while preserving input order, supporting more transparent and debuggable code generation processes.

_frb\codegen/src/library/codegen/ir/misc · high confidence

Added internal configuration structure for the HIR parser

The HIR parser module now includes an internal configuration struct (\ParserHirInternalConfig\) that allows specifying Rust input namespace packs, crate directories, third-party crate names, optional Rust feature flags, and a flag to control constant parsing. This configuration is exposed via the HIR parser's module interface to support these specific parsing options.

_frb\codegen/src/library/codegen/parser/hir · high confidence

Added lockable enum code generation utilities

The code generator now includes new utility modules for handling lockable enums. A new \lockable.rs\ file provides functions to generate Rust code that implements the \Lockable\ trait for enums, enabling both synchronous (blocking) and asynchronous read/write access to enum variants via RwLock guards. The \mod.rs\ file exposes this new module, making these code-generation helpers available to the early parser stage.

_frb\_codegen/src/library/codegen/parser/early\generator/utils · high confidence

Added macOS Runner configuration files

The macOS Runner target now includes a new \Configs\ directory containing \AppInfo.xcconfig\, \Debug.xcconfig\, \Release.xcconfig\, and \Warnings.xcconfig\. These files define the application's bundle identifier, product name, and copyright metadata, while also configuring build settings to include Flutter debug/release configurations and enabling strict compiler warnings for the macOS build.

_frb\_example/flutter\_via\create/macos/Runner/Configs · high confidence

Added macOS Runner project files

The macOS platform support for the Flutter example app has been initialized with the standard Xcode project structure. This includes the workspace configuration file (IDEWorkspaceChecks.plist) and the MainMenu.xib interface builder file, which defines the application menu bar with standard items like About, Preferences, Services, and Quit, as well as the Edit menu with standard text editing actions.

_frb\_example/flutter\_via\_create/macos/Runner.xcodeproj/project.xcworkspace, frb\_example/flutter\_via\create/macos/Runner/Base.lproj · high confidence

Added macOS platform support for the Rust UI Counter example

The macOS platform is now supported for the \frb\_example\_rust\_ui\_counter\ application. This change introduces the complete Xcode project structure, including the \Runner\ target, Cocoa app delegate, and main window configuration, enabling the Flutter UI to run natively on macOS. It also includes the necessary build configurations, entitlements for sandboxing and JIT execution, and a placeholder test suite.

_frb\_example/rust\_ui\counter/ui/macos · high confidence

Added minimal Rust integration example for Flutter

The Rust source directory for the flutter\_via\_integrate example now includes a basic implementation demonstrating the Flutter Rust Bridge. It defines a simple synchronous 'greet' function and an initialization routine in src/api/simple.rs, with the corresponding FFI bindings and serialization logic automatically generated by flutter\_rust\_bridge version 2.14.0-beta.2 in frb\_generated.rs. This provides a concrete, working reference for how Rust code is exposed to Flutter via the integrate method.

_frb\_example/flutter\_via\integrate/rust · high confidence

Added multi-package FFI binding support

A new \multi\_package.dart\ file has been added to the generated FFI bindings (\frb\_dart/lib/src/ffigen\_generated\), providing Dart wrappers for multiple C packages. This file exposes low-level Dart VM FFI functions such as \Dart\_PostCObject\, \Dart\_NewNativePort\, and \Dart\_CloseNativePort\, enabling the framework to handle native port communication and message passing across multiple bundled native libraries.

_frb\_dart/lib/src/ffigen\generated · high confidence

The Gallery example now includes the standard native project structures for Android and iOS, enabling the app to be built and run on mobile devices. On Android, this adds the main activity, manifest configurations, and Gradle wrapper (version 9.3.1). On iOS, this adds the Xcode project workspace, app delegate, launch storyboards, and asset catalogs. This scaffolding is a prerequisite for the Flutter UI layer to function as a standalone mobile application.

_frb\_example/gallery/android, frb\example/gallery/ios · high confidence

Added native build scaffolding for Linux and Windows

The gallery example now includes the native project files required to build and run on Linux and Windows. This adds the Linux GTK runner (CMake configuration, application entry point, and plugin registration) and the Windows Win32 runner (CMake configuration, window management, and DPI-awareness support), enabling the Flutter application to be compiled and executed on these desktop platforms.

_frb\_example/gallery/linux, frb\example/gallery/windows · high confidence

Added native iOS and macOS project scaffolding for the third-party integration example

The example application now includes the necessary native project structures for iOS and macOS, enabling the Flutter app to be built and run on Apple platforms. This change adds the Xcode project files, workspace configurations, and build settings (including CocoaPods integration via xcconfig files) for both targets. It also provides the standard native entry points (AppDelegate and MainFlutterWindow), asset catalogs for app icons and launch screens, and placeholder unit test targets, establishing the foundation for platform-specific code and third-party library integration.

_frb\_example/integrate\_third\_party/ios, frb\_example/integrate\_third\party/macos · high confidence

Added protobuf schema and generation scripts for benchmarking

Introduced a new protobuf definition file containing \BinaryTreeProtobuf\ and \BlobProtobuf\ message types, alongside a \justfile\ to automate code generation for both Rust and Dart targets. This enables consistent serialization benchmarks for binary tree structures and byte blobs within the pure Dart example.

_frb\_example/pure\dart/benchmark/protobuf · high confidence

Added simple benchmark entrypoint for Dart CLI

A new entrypoint file (bin/simple\_benchmark.dart) has been added to the pure\_dart example, which delegates to the shared benchmark implementation to allow users to run the simple benchmark via the Dart CLI.

_frb\_example/pure\dart/bin · high confidence

Added web entry point and PWA manifest for the third-party integration example

The \frb\_example/integrate\_third\_party/web\ directory now includes the standard Flutter web \index.html\ and \manifest.json\ files. This enables the example application to be served as a web app and supports Progressive Web App (PWA) features, such as standalone display and custom icons, for users accessing the integration demo via a browser.

_frb\_example/integrate\_third\party/web · high confidence

Added web entry point and manifest for Flutter example

The \frb\_example/flutter\_via\_create\ example now includes the standard \index.html\ and \manifest.json\ files required for web deployment. This provides the necessary HTML structure, base href configuration, and PWA metadata (including icons and theme colors) so the example can be built and served as a web application.

_frb\_example/flutter\_via\_create/web, frb\_example/rust\_ui\counter/ui/web · high confidence

Added web entry point and manifest for the Flutter integration example

The \frb\_example/flutter\_via\_integrate\ example now includes the standard \web/index.html\ and \web/manifest.json\ files required to run the application in a browser. The HTML file sets up the base href placeholder and loads the Flutter bootstrap script, while the manifest configures the app as a standalone PWA with specific theme colors and icon assets.

_frb\_example/flutter\_via\integrate/web · high confidence

Adds HIR filtering and third-party namespace relocation transformers

The codegen parser now includes two new transformation steps for the naive flat HIR: a filter transformer that removes private external definitions and items under the generated namespace while keeping self-crate and public external items, and a move transformer that relocates items from the self-crate third-party folder to their original external namespaces and marks them with a synthetic generation source.

_frb\_codegen/src/library/codegen/parser/hir/naive\flat/transformer · high confidence

Auto-generate getters and setters for struct fields

The code generator now automatically creates getter and setter methods for public fields within structs marked with the \\#\[frb(opaque)\]\ attribute. This new logic, located in the auto-accessor parser, iterates through struct fields and generates corresponding Rust methods (e.g., \auto\_accessor\_get\_field\_name\) that expose field values to Dart. The implementation respects field visibility and skips fields explicitly marked with \\#\[frb(ignore)\]\ or those that are opaque reference types, ensuring that only appropriate data is exposed through the generated bindings.

_frb\_codegen/src/library/codegen/parser/mir/parser/function/auto\accessor · high confidence

Automated Rust module injection and dependency auto-upgrade in codegen polish step

The codegen polish step now automatically injects the generated Rust module declaration into your \lib.rs\ (when \add\_mod\_to\_lib\ is enabled) and checks/upgrades the \flutter\_rust\_bridge\ Dart and Rust dependencies to match the current codegen version (when \enable\_auto\_upgrade\ is enabled). This reduces manual setup for Rust integration and helps keep dependencies in sync without failing the build if formatting or other polish steps encounter issues.

_frb\codegen/src/library/codegen/polisher · high confidence

Enable WebAssembly threads via cross-origin isolation

The gallery web application now supports WebAssembly threads by introducing a service worker (enable-threads.js) that sets Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy headers, allowing the app to run in a cross-origin-isolated state even on platforms like GitHub Pages that do not support custom server headers. This change is accompanied by the addition of standard web entry files (index.html and manifest.json) to properly configure the app's metadata, icons, and base path for the Flutter web build.

_frb\example/gallery/web · high confidence

Expanded MIR type parsing for collections, generics, and custom types

The type parser in the codegen module now supports a broader range of Rust types. It handles fixed-size arrays, generic type aliases (substituting type parameters), and optional arguments for HashMap and HashSet (e.g., custom hashers). It also parses chrono types (Duration, NaiveDate, NaiveDateTime, DateTime), serde\_json::Value, and Dart-specific types like DartOpaque and DartFn. Additionally, it supports custom serialization/deserialization delegates and lifetimeable types when enabled.

_frb\codegen/src/library/codegen/parser/mir/parser/ty · high confidence

Expanded pure Dart example with comprehensive API coverage

The \frb\_example/pure\_dart/rust\ example has been significantly expanded to cover a wide range of FlutterRustBridge capabilities. New API modules demonstrate support for fixed-size arrays, \chrono\ date/time types, deep collection equality, custom serializers, and \DartOpaque\ handling. It also includes tests for async spawning, event listeners, external implementations, and lifetimeable structs, providing a more robust reference for users.

_frb\_example/pure\dart/rust · high confidence

The gallery example now features a Mandelbrot set visualization page. Users can adjust the image size and number of threads via sliders, start and stop the computation, and view the resulting image along with the compute time. The example is generated using flutter\_rust\_bridge version 2.14.0-beta.2.

_frb\example/gallery · high confidence

Generated Dart classes now support opt-in deep equality for collections

The code generator now supports deep equality checks for Dart collections (Lists, Sets, Maps) in generated structs and arrays, controlled by the \dart\_collection\_deep\_equality\ configuration flag. When enabled, generated non-freezed structs and fixed-size arrays override \hashCode\ and \==\ to use \DeepCollectionEquality\ from the \collection\ package, ensuring that structural equality works correctly for nested collections rather than relying on reference identity. This change introduces new type-specific generators for delegates, enumerations, structures, and Rust opaque types, and adds a unit test to verify the emitted equality code.

_frb\_codegen/src/library/codegen/generator/api\_dart/spec\generator/class/ty · high confidence

Initial Android project scaffolding for the example app

The Android side of the \frb\_example\_integrate\_third\_party\ example has been initialized with standard Flutter project files. This includes the main AndroidManifest.xml declaring the MainActivity and Flutter embedding v2, Kotlin source for the MainActivity, resource definitions for light and dark mode launch themes, and build configuration files such as the Gradle wrapper (configured for Gradle 9.3.1) and a .gitignore to exclude build artifacts and sensitive keystore files.

_frb\_example/integrate\_third\party/android · high confidence

Initial Flutter FFI plugin example scaffold

The \frb\_example/flutter\_package\ directory now contains a complete, generated Flutter FFI plugin example. This includes the core Dart API entrypoints (\lib/flutter\_package.dart\ and generated Rust bindings), platform-specific native runner code for Linux (CMake and GTK application setup), and project configuration files (\.gitignore\, \.metadata\, \analysis\_options.yaml\). The example demonstrates how to invoke Rust functions from Dart using the \flutter\_rust\_bridge\ generator (version 2.14.0-beta.2), providing a starting point for integrating native code into Flutter applications.

_frb\_example/flutter\package · high confidence

Initial Flutter via Create Rust example scaffolding

The Rust side of the \flutter\_via\_create\ example has been initialized with a basic project structure. This includes a \greet\ API function for synchronous communication, an \init\_app\ hook for default user utilities, and the auto-generated \flutter\_rust\_bridge\ wiring (version 2.14.0-beta.2) that handles serialization and dispatch between Dart and Rust.

_frb\_example/flutter\_via\create/rust · high confidence

The macOS target for the frb\_example\_gallery application is now available, providing the complete native Xcode project structure required to build and run the app on macOS. This includes the core application entry points (AppDelegate and MainFlutterWindow), the main menu interface, app icon assets, and the necessary configuration files (Info.plist, entitlements, and xcconfigs) to support both Debug and Release builds. The setup also includes a basic XCTest suite for the native runner and a generated plugin registrant to handle Flutter plugin integration on the platform.

_frb\example/gallery/macos · high confidence

Initial release of the frb\_dart package with Dart WebAssembly support and updated linting

The frb\_dart package is introduced, providing the Dart-side runtime for Flutter Rust Bridge. This release adds support for Dart WebAssembly output in \build-web\ and normalizes web interop across compilers. It also updates the project's linting configuration to use \flutter\_lints\ and enforces \always\_use\_package\_imports\. The package includes standard Dart package scaffolding such as \.gitignore\, \.pubignore\, and \analysis\_options.yaml\.

_frb\dart · high confidence

Initial repository structure and documentation for FlutterRustBridge v2

The repository has been initialized with the core structure for the FlutterRustBridge v2 project, including the \frb\_codegen\, \frb\_rust\, and \frb\_macros\ crates, along with pure-Dart and Flutter example applications. This entry establishes the foundational configuration files such as \.fvmrc\ (pinning Flutter 3.41.2), \melos.yaml\ for monorepo management, and \justfile\ for build automation. It also introduces comprehensive documentation, including a detailed \README.md\ highlighting v2 features like arbitrary types, async Rust support, and WebAssembly compatibility, as well as \CONTRIBUTING.md\, \SECURITY.md\, and \CLAUDE.md\ for development guidelines. The changelog (\CHANGELOG.md\) documents the progression from v2.13.0 through v2.14.0-beta.2, covering features like HarmonyOS support, native assets integration, and Rust-to-Dart logging.

(repo-wide) · high confidence

Internal code generation for FFI bindings and Rust dispatchers

Added internal code generation logic that produces the Rust source code for FFI dispatcher modes (primary and sync) and generates the corresponding Dart FFI bindings via cbindgen and ffigen. This enables the codegen tool to automatically create the necessary glue code for cross-language communication.

_frb\codegen/src/library/internal · high confidence

Introduce CST decoder code generation for Rust wire types

The Rust wire codec generator now includes a new CST (C-struct based) decoder module that produces implementations for deserializing wire types back into API types. This change adds generation of the \CstDecode\ trait implementations, \NewWithNullPtr\ and \Default\ trait implementations for wire types, and helper functions to construct extern classes for decoder structs. It also introduces target-specific handling, using \JsValue\ for Web targets and prefixed wire types for Io targets, ensuring the generated code correctly bridges the wire format to the Rust API layer.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/cst/decoder · high confidence

Introduce CST-based Dart codec generation for wire encoding

Added a new code generation path for Dart wire codecs using the CST (Concrete Syntax Tree) approach. This introduces a dedicated generator context and entrypoint that handles encoding of Dart-to-Rust function arguments by generating specific \cst\encode\\ calls, while explicitly returning no output for decode operations in this initial implementation.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/cst · high confidence

Introduce Dart wire code generation infrastructure

Added the internal configuration, module structure, and text generation logic for the Dart wire code generator. This includes the \GeneratorWireDartInternalConfig\ struct to manage Dart-specific settings (such as output paths, class names, and FFIgen options), the main \generate\ entry point in \mod.rs\ that orchestrates spec and text generation, and the \text\_generator.rs\ module which assembles the final Dart source code from various code sections (boilerplate, API implementations, wire classes, and Rust/Dart bridges).

_frb\codegen/src/library/codegen/generator/wire/dart · high confidence

Introduce FVM install mode configuration and core codegen constants

The code generator now exposes an \FvmInstallMode\ enum with \Normal\ and \Skip\ variants, allowing users to control whether the Flutter Version Manager (FVM) installation step is executed or bypassed during plugin or app project generation. This mode is determined via a \from\_skip\_fvm\_install\ helper that maps a boolean skip flag to the corresponding enum variant. Additionally, the module defines constants and enums for template types (\App\, \Plugin\) and integration backends (\Cargokit\, \NativeAssets\), establishing the foundational configuration structures for these generation paths.

_frb\codegen/src/library/misc · high confidence

Introduce HIR tree data structures for code generation

Added new intermediate representation (HIR) types to model the Rust crate and module hierarchy: \HirTreeCrate\ (containing a crate name and root module), \HirTreeModule\ (with metadata, nested sub-modules, and items), and \HirTreePack\ (a collection of crates). These structures support nested module lookup by path and visibility checks, forming the foundational data model for the code generator's input representation.

_frb\codegen/src/library/codegen/ir/hir/tree · high confidence

Introduce MIR (Mid-level IR) for code generation

The code generation pipeline now uses a new Mid-level IR (MIR) to represent Dart bindings. This change introduces a suite of new data structures in the \frb\_codegen\ library, including \MirFunc\ for functions and methods, \MirStruct\ and \MirEnum\ for types, \MirField\ for struct members, and \MirCustomSerDes\ for custom serialization. It also adds support for custom Dart initializer code via \init\_dart\_code\ and allows skipping auto-accessors for fields marked with \\#\[frb(ignore)\]\. The \MirPack\ aggregates these elements, and the \MirIdent\ module handles name conversion and keyword escaping for both Rust and Dart.

_frb\codegen/src/library/codegen/ir/mir · high confidence

Introduce MIR function parser with stable ID assignment

The codebase now includes a new module for parsing MIR (Mid-level IR) functions, located at \frb\_codegen/src/library/codegen/parser/mir/parser/function\. This module aggregates parsing logic for real functions, auto-accessors, and constant getters, then returns the results sorted by name and assigns stable, sequential IDs to each function to ensure deterministic output for downstream consumers. A separate file defines a constant for UI mutation function AOP (Aspect-Oriented Programming) code injection.

_frb\codegen/src/library/codegen/parser/mir/parser/function · high confidence

Introduce MIR parser with configurable namespace filtering and parse modes

The MIR (Mid-level IR) parser module is now available, providing a structured pipeline to transform early IR into the MIR representation. Users can configure namespace handling via \ParserMirInternalConfig\, which includes settings for input namespace prefixes, codec modes, and error tolerance. The parser supports two distinct modes—\Early\ and \Normal\—allowing for different processing behaviors depending on the generation stage. This change introduces the core parsing logic, including trait implementation filtering, and exposes the configuration options needed to control how Rust namespaces and types are processed during code generation.

_frb\codegen/src/library/codegen/parser/mir · high confidence

Introduce Rust wire code generation module for misc boilerplate and imports

Added a new \misc\ module in the Rust wire generator that produces common boilerplate, file attributes, imports, and static checks for generated Rust code. This includes handling platform-specific imports (Web vs IO), generating a content hash for change detection, and integrating with the new MIR (Mid-level IR) representation for type and function processing.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/misc · high confidence

Introduce Rust-based build-web command with FVM and coverage support

The \frb\_codegen\ library now includes a new \build\_web\ module that acts as a Rust wrapper to execute Dart/Flutter commands for building web platforms. This change introduces support for Flutter Version Manager (FVM) via the \FvmInstallMode\ argument, allowing users to specify FVM usage during the build process. It also adds a \dart\_coverage\ flag that enables Dart code coverage collection by launching the VM service on port 8181 and running the \coverage:collect\_coverage\ tool. The module handles Dart root discovery, command execution, and error reporting, providing a structured way to invoke the underlying Dart \flutter\_rust\_bridge build-web\ logic.

_frb\_codegen/src/library/build\web · high confidence

Introduce Rust-side codec framework for Dart bridge messages

The \frb\_rust\ crate now includes a new codec subsystem (\src/codec/\) that defines a \BaseCodec\ trait and concrete implementations (CstCodec, DcoCodec, SseCodec) for serializing Rust-to-Dart messages. This provides a structured way to encode actions (like success, error, panic, or stream close) and payloads into Dart ABI formats, replacing ad-hoc serialization logic. The change also adds unit tests for the DCO and SSE codecs to verify message round-trips and payload encoding.

_frb\rust · high confidence

Introduce Rust-to-Dart logging bridge

A new singleton (\kFrbDartLogging\) in \frb\_dart/lib/src/logging/frb\_logging.dart\ bridges Rust \log\ records to the Dart \logging\ package. It normalizes Rust log levels (TRACE, DEBUG, INFO, WARN, ERROR) to corresponding Dart levels, forwards formatted messages to the appropriate Dart loggers, and provides a default output subscription that prints logs to the console. The bridge includes initialization logic that rejects duplicate initializations and a dispose method to clean up stream subscriptions and optional Rust logger resources.

_frb\dart/lib/src/logging · high confidence

Introduce RustStreamSink for Dart-side Rust stream consumption

Added the RustStreamSink class in frb\_dart/lib/src/stream/stream\_sink.dart, providing a Dart-side wrapper for consuming Rust StreamSink\<T\> data. This implementation manages a dedicated ReceivePort to receive raw messages, decodes them using a provided BaseCodec, and exposes a typed Stream\<T\> to the application. It includes robust lifecycle handling, ensuring that the underlying source stream is properly closed and subscriptions cancelled on termination, pause, resume, or cancellation events, while also guarding against StateErrors if accessed before setup.

_frb\dart/lib/src/stream · high confidence

Introduce SSE codec implementation for Rust wire generation

The Rust wire code generator now includes a new SSE (Simple Serialization Encoding) codec module. This adds the infrastructure to generate \SseEncode\ and \SseDecode\ trait implementations for Rust types, handling the serialization and deserialization of data via \SseSerializer\ and \SseDeserializer\. The entrypoint logic manages platform-specific ABI details, such as using \i64\ for ports on the IO target and \MessagePort\ on Web/Common targets, and processes byte-list parameters for interop.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/sse · high confidence

Introduce \`\#\[frb(external)\]\` and \`\#\[frb(ui\_state)\]\` macro attributes

The \frb\_macros\ crate now supports two new attribute macros: \\#\[frb(external)\]\ and \\#\[frb(ui\_state)\]\. The \external\ attribute allows users to mark implementation blocks for external handling, generating a dummy struct wrapper to facilitate code generation. The \ui\_state\ attribute automatically injects a \base\_state\ field into structs and provides a \set\_base\_state\ method, enabling seamless integration with the framework's UI state management.

_frb\macros · high confidence

Introduce early code generation pipeline for proxy enums, trait implementations, and UI boilerplate

The codegen parser now includes a new early generation stage that processes the intermediate representation to produce proxy enums for delegate types, enums for dynamic trait implementations, and optional UI-related boilerplate. This stage also sorts the generated HIR and trait definitions for consistency. For users, this enables automatic generation of Rust proxy enums and trait implementor enums based on MIR data, and conditionally injects Flutter/Dart boilerplate (including a state management helper and a sync text field) when UI state attributes are detected in the source structs.

_frb\_codegen/src/library/codegen/parser/early\generator · high confidence

Introduce flat HIR parser for existing handlers and mirror identifiers

The flat HIR parser now includes logic to detect existing custom handlers by scanning for a specific static symbol and to parse mirror identifiers from FRB attributes, enabling the code generator to correctly handle pre-existing handlers and type mirroring during the parsing phase.

_frb\codegen/src/library/codegen/parser/hir/flat/parser · high confidence

Introduce flat HIR representation for codegen IR

The codegen Intermediate Representation (IR) now includes a 'flat' module that normalizes Rust language items into a simplified, serializable structure. This change adds new types for functions, structs, enums, traits, trait implementations, constants, and type aliases, each equipped with a sort key to facilitate consistent ordering and deduplication. A central \HirFlatPack\ aggregates these components, enabling the code generator to process a unified, flattened view of the source code.

_frb\codegen/src/library/codegen/ir/hir/flat · high confidence

Introduce flutter\_rust\_bridge\_hooks for Native Assets integration

The new \frb\_hooks\ package provides the Dart-side build hook implementation for the Native Assets integration backend. It exposes the \FlutterRustBridgeNativeAssetsBuilder\ class, which orchestrates Rust compilation via the \native\_toolchain\_rust\ library and manages asset routing. A key behavioral addition is a Windows-specific workaround that shortens output directory paths to prevent exceeding Windows toolchain limits, alongside a file-locking mechanism to ensure build safety. This package is intended for use by generated Flutter projects and integration templates to replace the legacy CargoKit approach.

_frb\hooks · high confidence

Introduce frb\_utils package with web test and serve commands

The new frb\_utils package provides CLI tools for web development and testing workflows. It adds a 'serve-web' command to host static files (defaulting to port 8080) and a 'test-web' command to run Dart web tests using Puppeteer, supporting both dart2js and dart2wasm compilation targets. The test harness includes a custom entrypoint that bridges test results to the runner via WebSocket and configures the browser to respect environment-based proxy settings while bypassing proxies for loopback addresses. Additionally, it introduces a 'simpleBuild' utility for Dart 3.10+ hooks to manage Rust crate builds with configurable features and environment variables.

_frb\utils · high confidence

Introduce generalized Uint8List abstraction for Dart platforms

The library now provides a unified \GeneralizedUint8List\ interface that abstracts the underlying byte storage mechanism based on the target platform. On native/io platforms, this is implemented by \RustVecU8\, which manages memory via FFI pointers to Rust vectors and supports resizing and disposal. On web platforms, it uses \AdaptedUint8List\, which wraps standard Dart \Uint8List\ and adapts it to the interface using \dart:js\_interop\. This change allows code to interact with byte buffers consistently across environments without handling platform-specific memory management details directly.

_frb\_dart/lib/src/generalized\uint8list · high confidence

Introduce generalized isolate support for Web platforms

The \generalized\_isolate\ library now provides a unified API for inter-isolate communication that works on both native and Web platforms. This is achieved by introducing platform-specific shims: \\_io.dart\ for native environments and \\_web.dart\ for Web, which implements \ReceivePort\, \SendPort\, and \RawReceivePort\ using the Web \MessageChannel\ and \BroadcastChannel\ APIs. The main \generalized\_isolate.dart\ file exports the appropriate implementation based on the target platform, allowing users to use the same isolate-like communication patterns in Flutter Web applications.

_frb\_dart/lib/src/generalized\isolate · high confidence

Introduce language-specific code generation traits for Dart and Rust

Added a new \LangTrait\ abstraction in the SSE codec generator that provides language-specific implementations for Dart and Rust. This change introduces \DartLang\ and \RustLang\ structs that handle target-language syntax for serialization calls (\sse\_encode\/\sse\_decode\), constructor generation (supporting both positional and named/keyword arguments), and control flow structures (loops and switch/match expressions). The implementation includes a dispatch enum to route these calls and comprehensive unit tests verifying that the generated code snippets match the correct syntax for each language.

_frb\codegen/src/library/codegen/generator/codec/sse/lang · high confidence

Introduce minimal Rust API example for Flutter Rust Bridge

The \frb\_example/dart\_minimal/rust\ crate now provides a minimal, working example of a Flutter Rust Bridge integration. It includes a generated \frb\_generated.rs\ file (version 2.14.0-beta.2) that sets up the default SSE codec and handler, and a \minimal.rs\ API module exposing two functions: \init\_app\ for initialization and \minimal\_adder\ for a simple integer addition. This serves as a baseline reference for how to structure Rust code and expose it to Dart using the bridge.

_frb\_example/dart\minimal/rust · high confidence

Introduce naive flat HIR representation for code generation

Added a new intermediate representation module (\naive\_flat\) within the HIR codegen layer, defining \HirNaiveFlatItem\ and \HirNaiveFlatPack\ structs to represent flattened code items with their metadata (namespace, sources, visibility) and serialized \syn::Item\ data. This provides a new structural format for representing code generation inputs in a flat, serializable manner.

_frb\_codegen/src/library/codegen/ir/hir/naive\flat · high confidence

Introduce new internal runtime support classes and update version to 2.14.0-beta.2

The library adds new internal support classes in the \misc\ directory: \Box\<T\>\ for generic value wrapping, \RustOpaque\ and \RustOpaqueInterface\ to manage opaque pointers to native Rust types with explicit dispose and move semantics, and \SimpleDisposable\ as a mixin for basic disposal tracking. Additionally, the runtime version constant \kFlutterRustBridgeRuntimeVersion\ is updated to '2.14.0-beta.2'.

_frb\dart/lib/src/misc · high confidence

Introduce platform-agnostic Droppable resource management

The library now provides a unified \Droppable\ abstraction for managing native resources that must be released exactly once, supporting both native (FFI) and web (js\_interop) platforms. This change introduces platform-specific finalizer implementations (\\_io.dart\ for native, \\_web.dart\ for web) and a shared core (\\_common.dart\) that ensures resources are disposed either explicitly via \dispose()\ or automatically via finalizers, while preventing double-release through a \forget()\ mechanism. Users benefit from consistent resource lifecycle handling across platforms without needing to manage platform-specific cleanup logic manually.

_frb\dart/lib/src/droppable · high confidence

Introduce platform-specific Dart opaque interop handling

The library now includes a new \dart\_opaque\ module that separates opaque data serialization logic into platform-specific implementations. Common decoding and encoding logic is shared via \\_common.dart\, while \\_io.dart\ handles native I/O platforms and \\_web.dart\ manages web platforms. The web implementation specifically wraps Dart functions using \AllowInteropFunctionWrapper\ to ensure proper interoperability, addressing issue \#2183. This structure allows the framework to correctly serialize and deserialize opaque Dart objects across different execution environments.

_frb\_dart/lib/src/dart\opaque · high confidence

Introduce platform-specific Rust binding implementations for IO and Web

The library now provides distinct implementations of the \GeneralizedFrbRustBinding\ class for different platforms: \\_io.dart\ handles native FFI bindings for desktop/mobile environments, while \\_web.dart\ implements the binding using \dart:js\_interop\ for WebAssembly targets. The main entry point \generalized\_frb\_rust\_binding.dart\ conditionally exports the appropriate implementation based on the target platform, enabling the framework to support both native and web execution contexts through a unified interface.

_frb\_dart/lib/src/generalized\_frb\_rust\binding · high confidence

Introduce platform-specific native library loader

The library now includes a new loader module that handles loading external native libraries differently depending on the target platform. For native environments (IO), it supports loading dynamic libraries (.so, .dll, .dylib) with platform-specific fallbacks for Android, iOS, macOS, Windows, and Linux, including support for HarmonyOS. For web environments, it loads WebAssembly modules using the wasm\_bindgen configuration. The loader accepts configuration for library stems, directories, and prefixes, ensuring correct library resolution across different deployment scenarios.

_frb\dart/lib/src/loader · high confidence

Introduce platform-specific utilities for Dart web and IO environments

Added a new platform abstraction layer in \frb\_dart/lib/src/platform\_utils\ that provides distinct implementations for IO and web platforms. The IO implementation (\\_io.dart\) offers a no-op \maybeDartify\ function, while the web implementation (\\_web.dart\) introduces JavaScript interop capabilities, including \jsEval\ for script execution, \crossOriginIsolated\ detection, and robust \BigInt\ conversion helpers (\castNativeBigInt\, \jsBigIntToDartBigInt\) to handle large integer values across the Dart-JavaScript boundary. The main entry point (\platform\_utils.dart\) uses conditional exports to automatically select the correct implementation based on whether the code is running in a Dart VM or a JavaScript environment.

_frb\_dart/lib/src/platform\utils · high confidence

Introduce pure Dart example project with generated bindings

A new \frb\_example/pure\_dart\ project has been added to demonstrate \flutter\_rust\_bridge\ usage in a pure Dart environment (without Flutter). This includes generated Dart bindings (e.g., \lib/src/rust/\), a C header (\frb\_generated.h\), and configuration files (\flutter\_rust\_bridge.yaml\, \analysis\_options.yaml\, \dart\_test.yaml\). The example showcases various bridge features such as array handling, async operations, custom serializers, and deep collection equality, providing a reference implementation for developers.

_frb\_example/pure\dart · high confidence

Introduce raw HIR data structures for crate and pack representation

Added new internal data structures to the code generation intermediate representation (HIR) to model raw crate and pack information. The \HirRawCrate\ struct now holds a crate name and its corresponding \syn::File\ AST, while \HirRawPack\ aggregates a list of these crates, providing a foundational layer for parsing and organizing Rust source code during code generation.

_frb\codegen/src/library/codegen/ir/hir/raw · high confidence

Introduce structured progress reporting and FVM mode support in code generation

The code generator now provides detailed, step-by-step progress feedback to users via a new \GeneratorProgressBarPack\ that tracks stages like parsing, generation, and polishing (including specific sub-steps for Dart/Rust formatting and build runner execution). Additionally, the generator explicitly supports configuring the Flutter Version Manager (FVM) install mode, allowing users to control how FVM is handled during the code generation process, while also ensuring that code generation is safely skipped during nested Cargo expansions.

_frb\codegen/src/library/codegen · high confidence

Introduces CST encoder implementations for Dart wire types

Adds a new set of type-specific encoders for the Dart Common Serialization (CST) codec, covering primitives, lists, optionals, enums, delegates, and opaque types. This enables the code generator to produce Dart-side serialization logic for these types, with target-specific handling for both Web (JS interop) and IO (FFI) platforms.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/cst/encoder/ty · high confidence

Introduces DCO decoder implementations for all Dart types

The code generator now produces Zero-Copy (DCO) decoders for the full range of Dart types, including primitives, boxed values, optionals, lists, records, structures, enums, and opaque types. This ensures that data passed from Rust to Dart via the DCO protocol is correctly decoded into native Dart objects, replacing previous fallbacks or unimplemented states for many complex types.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/dco/decoder/ty · high confidence

Introduces HIR misc utilities for code generation

The codegen IR now includes a new \misc\ module providing foundational utilities for handling Rust syntax elements. This includes a \HirGenerationSource\ enum to track where code originates, a \GeneralizedItemFn\ type to unify access to function signatures and attributes across standalone, impl, and trait contexts, and a \HirVisibility\ enum to normalize \syn::Visibility\ states. Additionally, it adds serialization helpers for \syn\ types and a \SynItemStructOrEnum\ trait to standardize attribute and generic access for structs and enums, accompanied by unit tests for these components.

_frb\codegen/src/library/codegen/ir/hir/misc · high confidence

Introduces PDE codec entrypoint for Dart-to-Rust code generation

Adds the PDE (PDEWireDartCodecEntrypoint) codec implementation for the Dart code generator, which produces Dart functions that serialize inputs and invoke Rust via \pdeCallFfi\. The implementation handles function IDs, manages port arguments for normal modes, and ensures serializer cleanup is scoped correctly before the FFI handoff, with tests verifying behavior for normal and sync modes.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/pde · high confidence

Introduces PDE codec entrypoint for FFI dispatcher generation

The code generator now includes a dedicated entry point for the PDE (Packed Data Encoding) codec mode. This addition implements the logic to generate FFI dispatcher functions that route incoming calls based on function ID, specifically handling both Primary and Sync execution modes. The generated dispatcher functions correctly apply mode-specific signatures, such as including the MessagePort argument for primary calls and returning WireSyncRust2DartSse for sync calls, ensuring the correct contract is emitted for each mode.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/pde · high confidence

Introduces Rust CST decoder generators for all supported types

The codegen now generates a complete set of decoder implementations for the new CST wire format across all data types. This includes specialized handling for primitives (with specific JS value conversions for 64-bit integers on Web), boxed types, optional values, general and primitive lists (using JavaScript typed arrays on Web), enums, delegates (such as strings, dates, and JSON values), and opaque types. This change ensures that Rust code correctly decodes data received from Dart/Flutter over the new CST protocol on both native and Web targets.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/cst/decoder/ty · high confidence

Introduces SSE codec generation for Dart wire bindings

Adds a new code generation path for the Dart side of the FlutterRustBridge wire protocol, specifically implementing the 'SSE' (Single-Stream-Encoder) codec mode. This change introduces the \SseWireDartCodecEntrypoint\ and supporting modules (\base\, \body\, \entrypoint\) that generate Dart API implementation methods for encoding and decoding types using \SseSerializer\ and \SseDeserializer\. The generated code includes proper resource management, ensuring that serializer buffers are released via \dispose()\ if Dart encoding throws an error, and optimizes by omitting cleanup scopes when there are no inputs to encode.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec/sse · high confidence

Introduces SSE type codec generators for Dart and Rust

The codegen library now includes a new set of type-specific generators under \frb\_codegen/src/library/codegen/generator/codec/sse/ty\ to handle serialization and deserialization for the SSE (Simple Structured Encoding) protocol. This change adds implementations for primitives, lists, optionals, enums, records, boxed types, and various opaque types (Dart opaque, Rust opaque, and Rust auto-opaque implicit). These generators produce the specific Dart and Rust code required to encode and decode these types over the wire, supporting both strict and loose type handling where applicable.

_frb\codegen/src/library/codegen/generator/codec/sse/ty · high confidence

Introduces a comprehensive MIR type system for code generation

The codegen IR now features a complete, modular type system under \frb\_codegen/src/library/codegen/ir/mir/ty\ to represent and process Rust types for Dart bindings. This change introduces specific type nodes for primitives, lists (general and primitive), boxed types, optionals, records, and enums, alongside specialized handlers for Dart functions, Dart opaque pointers, and Rust opaque types. It also includes a delegate system for complex types like maps, sets, and time types, along with support for dynamic types and trait definitions. This structured approach allows the code generator to accurately map Rust types to their Dart equivalents, handle ownership and lifetimes, and generate the necessary serialization and deserialization logic.

_frb\codegen/src/library/codegen/ir/mir/ty · high confidence

Introduces duplicate-merging transformer for flat HIR components

The code generator now includes a new transformer that deduplicates and merges duplicate entries in the flat High-Level Intermediate Representation (HIR) for functions, structs, enums, and traits. This change introduces a modular merging system with three specific strategies: \ThirdPartyOverrideMerger\ merges attributes when code is moved from a third-party crate folder, \FunctionFrbOverrideMerger\ prioritizes functions explicitly marked as FRB overrides, and \TraitDefDefaultImplMerger\ replaces copied trait default implementations with normal implementations. The \transform\ function applies these mergers to the \HirFlatPack\ to resolve conflicts before code generation proceeds.

_frb\_codegen/src/library/codegen/parser/hir/flat/transformer/merge\_duplicate\transformer · high confidence

Introduces structured Dart code generation utilities with import optimization

The codegen library now includes a new \basic\_code\ module that provides structured types for generating Dart, Rust, and C code. For Dart specifically, it introduces \DartHeaderCode\ to manage file headers, imports, and parts, featuring an \optimize\_imports\ function that automatically sorts and deduplicates import statements to ensure consistent output. A \parse\_dart\_code\ utility is also added to separate import directives from the rest of the source body, enabling more precise manipulation of generated Dart files.

_frb\_codegen/src/library/utils/basic\code · high confidence

Introduction of DCO codec generator for Rust wire encoding

The codebase now includes a new DCO (Direct Code Optimization) codec generator for Rust wire specifications. This addition introduces a modular structure under \frb\_codegen/src/library/codegen/generator/wire/rust/spec\_generator/codec/dco\, featuring a base module that defines the \WireRustCodecDcoGenerator\ struct and its associated context, an entrypoint module (\DcoWireRustCodecEntrypoint\) that handles the generation of encode operations for MIR types, and an encoder module. The entrypoint specifically implements encoding logic while explicitly marking decode-related functions as unreachable, indicating this initial implementation focuses solely on the encoding side of the wire protocol for Rust.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/dco · high confidence

Introduction of Rust wire codec entrypoint traits and module structure

The code generation system for Rust wire protocols now includes a new module structure under \frb\_codegen/src/library/codegen/generator/wire/rust/spec\_generator/codec\. This change introduces a \base.rs\ file defining the \WireRustCodecEntrypointTrait\, which establishes the interface for codec entrypoints (such as CST, DCO, PDE, and SSE) to generate function parameters and decode function calls. The \mod.rs\ file exposes these codec sub-modules, enabling the code generator to utilize these specific codec implementations for handling Rust-side wire protocol serialization and deserialization.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec · high confidence

Introduction of RustArc for Dart-side smart pointer management

The library now includes a new \RustArc\<T\>\ class in \frb\_dart/lib/src/rust\_arc\ that implements Dart-side reference counting for Rust \std::sync::Arc\ objects. This addition provides methods to clone references, convert to raw pointers (\intoRaw\), and manage memory lifecycle via static data structures, ensuring proper integration with Dart's FFI finalization. The implementation is platform-aware, exporting common logic for native environments and specific handling for web via \dart.library.js\_interop\.

_frb\_dart/lib/src/rust\arc · high confidence

Introduction of early IR generator data structures

The codebase now includes a new \early\_generator\ module within the Intermediate Representation (IR) layer, introducing data structures to model proxied types and trait definitions. Specifically, \IrEarlyGeneratorPack\ aggregates flat HIR packs with lists of \IrEarlyGeneratorProxiedType\ and \IrEarlyGeneratorTraitDefInfo\, enabling the code generator to track type proxies and trait variants during the early generation phase.

_frb\_codegen/src/library/codegen/ir/early\generator · high confidence

Introduction of naive\_flat HIR parsing pipeline

A new module at frb\_codegen/src/library/codegen/parser/hir/naive\_flat has been added to handle the parsing and transformation of the High-Level Intermediate Representation (HIR). This module exposes a parse function that orchestrates a specific sequence of processing steps: initial parsing, moving third-party overrides, and filtering, with intermediate dumps provided for debugging purposes.

_frb\_codegen/src/library/codegen/parser/hir/naive\flat · high confidence

New Dart repository environment checking and version resolution logic

The codegen now includes a dedicated module for validating Dart/Flutter project environments. It detects whether a project uses the Dart or Flutter toolchain, resolves workspace roots, and verifies that required dependencies are both specified in pubspec.yaml and correctly pinned in pubspec.lock. This includes handling transitive dependencies in workspaces and converting Dart version constraints (like caret syntax) to Cargo-compatible requirements for accurate matching.

_frb\_codegen/src/library/utils/dart\repository · high confidence

New Dart wire class generator for Web and IO targets

The code generator now produces Dart wire classes that bridge Rust extern functions to Dart, with separate implementations for Web (WASM) and IO targets. For Web, it generates a Dart class implementing \BaseWire\ that forwards calls to a JS/WASM module, and a companion class defining the external JS bindings. The generator handles type mapping, converting Rust pointers to Dart \int\ and other types to \JSAny?\, ensuring correct Dart signatures for the generated interop code.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\_generator/wire\class · high confidence

New HIR flat transformers for trait copying, filtering, overrides, and type resolution

The codegen pipeline now includes a set of new transformers in the HIR flat layer that refine how Rust code is processed before binding generation. The \copy\_trait\_def\_to\_impl\_transformer\ copies function definitions from trait declarations into their implementing structs or enums, ensuring the generated code reflects the implementation context. The \filter\_transformer\ removes private functions and constants from external crates, keeping only public items from configured input namespaces. The \function\_frb\_override\_transformer\ recognizes functions prefixed with \frb\override\\ and adjusts their metadata to allow explicit user overrides. The \remove\_not\_defined\_trait\_transformer\ filters out methods belonging to traits that were not parsed, while respecting a whitelist (e.g., \Default\) and explicit \\#\[frb\]\ attributes. Finally, the \resolve\_type\_alias\_transformer\ eagerly resolves non-generic type aliases using topological sorting to flatten nested definitions, and the \sort\_transformer\ orders components for deterministic output.

_frb\codegen/src/library/codegen/parser/hir/flat/transformer · high confidence

New MIR parser module for attributes, types, and serialization

The codegen parser now includes a new \mir/parser\ module that handles parsing of \\#\[frb\]\ attributes (such as \ignore\_all\, \init\_dart\_code\, and codec modes), custom serialization/deserialization definitions, extra types, and trait implementations. It also introduces lifetime extraction and replacement utilities to manage Rust lifetimes during code generation. This change restructures how the MIR (Mid-level IR) is constructed from the HIR, providing a more modular and robust foundation for parsing Rust source code into the intermediate representation used for Dart bindings.

_frb\codegen/src/library/codegen/parser/mir/parser · high confidence

New MIR sanity checks for auto-accessors, opaque types, and unused inputs

The codegen parser now includes a new \sanity\_checker\ module that validates MIR structures at parse time. It warns when fields of opaque types have unreasonable getter semantics (auto\_accessor\_checker), suggests wrapping opaque types inside translatable structures with \RustAutoOpaque\ (opaque\_inside\_translatable\_checker), and identifies struct or enum types declared in input paths that are never actually used in the generated bindings (unused\_checker). These checks help users catch configuration issues and clean up unused code early in the build process.

_frb\_codegen/src/library/codegen/parser/mir/sanity\checker · high confidence

New Python-based developer tooling scripts for CI, release, and local environments

Added several new Python scripts to streamline development workflows: \frb-categorize-code-diff.py\ classifies code changes as test-only, non-test, or mixed; \frb-dev-env.py\ manages local development environments including Docker containers, Tart VMs, and Android emulators; \codecov\_analyzer.py\ downloads and analyzes Codecov reports to identify missing patch lines; \release\_ci\_gate.py\ enforces release commit policies by checking changed paths against an allowlist; \verify\_changelog.py\ validates changelog entries for correct PR numbers and author credits; \find\_ios\_simulator\_udid.py\ locates iOS simulator UDIDs; and \frb\_vmware\_windows\_env.py\ manages VMware Windows virtual machines for testing. All scripts use Typer for CLI argument parsing.

python · high confidence

New Rust library for mirroring complex data structures and external types

Added a new Rust library (\example\_external\_lib\) that defines a variety of data structures intended for mirroring, including nested structs, enums, vectors, and HashMaps. It also introduces external structs with methods, distinguishing between translatable types (like \SimpleTranslatableExternalStructWithMethod\) and opaque types containing non-translatable resources like \Mutex\ (like \SimpleOpaqueExternalStructWithMethod\). This library serves as a testbed for demonstrating how complex Rust types are handled in the framework.

_frb\_example/pure\_dart/rust/example\_external\lib · high confidence

New SSE codec generation utilities for Dart

This change introduces new modules within the SSE (Single-File/Stream Encoder) code generator to support Dart output. It adds \encode\_to\_enum.rs\, which generates Dart code to map runtime type checks to specific enum constructors, and \misc.rs\, which ensures essential primitive types (I32, Bool) are included in the generated type set. These components are wired together in the SSE codec module to facilitate more robust Dart serialization.

_frb\codegen/src/library/codegen/generator/codec/sse · high confidence

New codegen utility modules for comments, paths, and target handling

The \frb\_codegen\ generator now includes a new \misc\ module containing utilities that improve generated code structure and platform targeting. Users will see codec-specific comments (e.g., \// Codec=Cst (C-struct based)\) added to generated files to clarify the serialization mode. Generated files also include a standard header with the \@generated\ tag and the current crate version. The code generator now supports platform-specific output (Io vs. Web) with a flag to conditionally omit Web targets, and provides helpers to insert section headers only when content is present. Additionally, field naming for structs and records is now handled consistently across Dart and Rust, supporting both named and positional syntax.

_frb\codegen/src/library/codegen/generator/misc · high confidence

New codegen utility modules for keyword escaping, logging, and path handling

The codegen library now includes a suite of new utility modules in \frb\_codegen/src/library/utils\ that enhance code generation reliability and developer experience. Keyword escaping functions (\cbindgen\_keywords.rs\, \dart\_keywords.rs\) automatically append an underscore to identifiers that conflict with reserved C++ or Dart keywords, preventing compilation errors in generated bindings. A new opinionated logging system (\logs.rs\) integrates with the progress bar UI, routing debug logs to date-stamped files and colored console output while respecting the \RUST\_LOG\ environment variable. Path and namespace utilities (\path\_utils.rs\, \namespace.rs\, \crate\_name.rs\) provide robust handling of Rust module paths, Dart package detection, and Windows UNC path normalization. Additionally, \console.rs\ introduces a \SimpleProgressBar\ for visual feedback, and \file\_utils.rs\ adds safe temporary file modification with automatic rollback.

_frb\codegen/src/library/utils · high confidence

New example for integrating third-party Rust crates with Web Audio API bindings

Added the \frb\_example/integrate\_third\_party\ example, which demonstrates automatically scanning and binding third-party Rust crates. The generated Dart code includes a \MediaElement\ API and extensive Web Audio API bindings (nodes, contexts, streams), configured via \flutter\_rust\_bridge.yaml\ to rename \MyMediaElement\ to \MediaElement\ and enable 64-bit integer support.

_frb\_example/integrate\_third\party · high confidence

New example project for Flutter native assets integration

Added the \flutter\_via\_integrate\_native\_assets\ example project, which demonstrates integrating Rust libraries into Flutter using the native assets backend. The project includes a Flutter app that calls a Rust \greet\ function, a \hook/build.dart\ script to configure the \FlutterRustBridgeNativeAssetsBuilder\, and an integration test to verify the Rust library is correctly linked and functional.

_frb\_example/flutter\_via\_integrate\_native\assets · high confidence

New flat HIR parser pipeline and code injection capabilities

The flat HIR parser module now exposes a structured pipeline that transforms naive HIR data through a series of specific steps: packing, filtering, removing undefined traits, copying trait definitions to implementations, handling FRB overrides, merging duplicates, resolving type aliases, and sorting. This module also introduces an exporter for mapping structs, enums, traits, and type aliases (including generic ones) into lookup maps, and an extra code injector that allows appending and optionally parsing additional Rust source code into the HIR pack.

_frb\codegen/src/library/codegen/parser/hir/flat · high confidence

New flutter\_via\_create\_native\_assets example project

Added a new example project demonstrating Flutter via create native assets integration. The project includes a complete Flutter application structure with iOS, Android, Linux, and web platform scaffolds, along with Rust code generation configuration via flutter\_rust\_bridge. It features a simple integration test that verifies Rust function calls work correctly, and includes a build hook script for native asset compilation.

_frb\_example/flutter\_via\_create\_native\assets · high confidence

New integration templates for Flutter-Rust Bridge projects

The integration templates in the shared assets have been restructured to provide a complete, ready-to-use project scaffold for new Flutter-Rust Bridge applications. This includes a standard Flutter app entry point that initializes the Rust library and displays a greeting, a dedicated smoke test for OpenHarmony (OHOS) devices to verify Rust linkage, and integration tests for both the standalone app and plugin examples to assert that Rust functions can be called successfully. Additionally, the templates now include the necessary Rust crate configuration files (Cargo.toml, Cargo.lock template, .gitignore) and the flutter\_rust\_bridge configuration file to streamline project setup.

_frb\_codegen/assets/integration\template/shared · high confidence

New internal codegen dumper for debugging intermediate artifacts

The code generation pipeline now includes an internal dumper that can write intermediate artifacts (such as config, source, HIR, MIR, and generator specs) to disk for debugging purposes. This feature is controlled via a new \DumperInternalConfig\ which specifies the output directory and which content types to dump, allowing developers to inspect the internal state of the code generation process.

_frb\codegen/src/library/codegen/dumper · high confidence

New minimal Dart build.rs example for flutter\_rust\_bridge

Added a new minimal example project (\frb\_example/dart\_build\_rs\) that demonstrates using \flutter\_rust\_bridge\ with a Dart-based build script (\build.dart\) instead of the standard Flutter tooling. The example includes a simple Rust API (\minimalAdder\) and generated Dart bindings (version 2.14.0-beta.2) for both native (IO) and web (WASM) targets, along with a standalone HTML file to test calling the WASM module directly from JavaScript.

_frb\_example/dart\_build\rs · high confidence

New project creation and integration scaffolding logic

The codegen library now includes a new \creator\ module that handles the generation of new Flutter + Rust projects. This feature allows users to create new app or plugin projects with configurable options such as organization name, template type, integration backend (including support for native assets), and platform selection. The creation process invokes \flutter create\, cleans up unnecessary template files specific to the chosen template (app vs plugin) and backend, and then integrates the Rust bridge code. Additionally, utility functions for overlaying directory structures with placeholder replacement and filtering are added, along with unit tests for these utilities.

_frb\codegen/src/library/integration · high confidence

New pure Dart benchmark suite for performance testing

The pure Dart example now includes a comprehensive benchmark suite located in \frb\_example/pure\_dart/benchmark\. This addition introduces a new entry point (\simple\_benchmark.dart\) and a set of generated benchmark classes in \src/generated.dart\ that measure the performance of various Rust-to-Dart communication patterns, including standard FFI, SSE, and raw wire access, across different data types like integers, strings, bytes, and complex structures (binary trees, blobs) serialized via JSON and Protobuf. The suite utilizes the \benchmark\_harness\ package and provides a \JsonEmitter\ for structured output, allowing users to run specific benchmarks via command-line arguments and filter results by name.

_frb\_example/pure\dart/benchmark · high confidence

New pure Dart example generator infrastructure

The \tools/frb\_internal\ package now includes a complete, modular generator for the \frb\_example\_pure\_dart\ project. This new system introduces a \BaseGenerator\ abstraction and specific \DartGenerator\ and \RustGenerator\ implementations to produce test entrypoints, identity functions, and benchmark code. It centralizes type metadata in \basic\_type\_infos.dart\ to drive the generation of tests for primitive types, lists, maps, and optionals, while a \DuplicatorMode\ system automatically creates variant implementations (sync, async, SSE, MOI) from source templates. Additionally, a dedicated \pde\_generator.dart\ handles the creation of the \pure\_dart\_pde\ variant by copying and transforming the base example, ensuring both projects are kept in sync through this unified internal tooling.

_tools/frb\internal · high confidence

New unified code generation configuration system

The code generation tooling now uses a new, structured configuration system that supports multiple file formats (YAML, JSON) and locations (\.flutter\_rust\bridge.\\, \pubspec.yaml\). Users can now customize code generation behavior through a comprehensive set of options, including input/output paths, Dart and Rust formatting settings, library loading prefixes, and feature flags. The system automatically discovers configuration files in a defined priority order and rejects unknown fields to prevent misconfiguration.

_frb\codegen/src/library/codegen/config · high confidence

New utility classes for port management and task timeouts

Added four new utility components to the framework's internal utils: BaseLazyPortManager for managing lazy-initialized receive ports, port generators (ExecuteStreamPortGenerator and BaseLazyPortIdGenerator) for creating unique port identifiers, singleCompletePort for handling one-time message responses with optional callbacks, and TimeoutHandlerMixin which adds configurable timeout support to task execution via FrbTimeoutException.

_frb\dart/lib/src/utils · high confidence

Opt-in deep equality for Dart collection structs

Users can now opt into deep equality semantics for Dart structs containing collections (lists, maps, sets) by applying the \\#\[flutter\_rust\_bridge\_macros::frb(dart\_collection\_deep\_equality)\]\ attribute to the corresponding Rust struct. When enabled, the generated Dart code imports \package:collection/collection.dart\ and implements \==\ and \hashCode\ using \DeepCollectionEquality\, ensuring that structs with identical collection contents are considered equal regardless of reference identity. This applies to nested collections within the struct and fixed-size arrays, providing consistent value-based comparison for complex data types.

_frb\_codegen/test\_fixtures/library/codegen/generator/api\dart/mod/simple · high confidence

Platform-specific manual implementations for Dart code generation

The code generator now supports manual implementation overrides for platform-specific Dart logic by exporting new files in \frb\_dart/lib/src/manual\_impl\. This includes \\_common.dart\ for shared decoding utilities (such as timestamps, durations, and panic errors), \\_io.dart\ for native/FFI-specific decoding of primitives and 64-bit integers, and \\_web.dart\ for web-specific handling using \dart:js\_interop\ and \BigInt\ conversions. The generator can now produce code that delegates to these manual implementations, ensuring correct behavior across both native and web Dart environments.

_frb\_dart/lib/src/manual\impl · high confidence

Pure Dart example project scaffolded with flutter\_rust\_bridge 2.14.0-beta.2

A new \pure\_dart\_pde\ example project has been added to demonstrate \flutter\_rust\_bridge\ capabilities in a pure Dart environment. The project is generated by version 2.14.0-beta.2 and includes configuration files such as \flutter\_rust\_bridge.yaml\, \analysis\_options.yaml\, and \dart\_test.yaml\. It provides generated Dart bindings for various Rust APIs, covering features like async operations, opaque types, custom serialization, and deep collection equality, serving as a reference implementation for the library's pure Dart support.

_frb\_example/pure\_dart\pde · high confidence

Restored OHOS entry module scaffold for flutter\_via\_create

The entry module for the OpenHarmony (OHOS) target has been restored, providing the necessary application shell to run Flutter apps on this platform. This includes the EntryAbility to initialize the Flutter engine and register plugins, the main Index page to host the Flutter view, and the module.json5 configuration defining the app's entry point and permissions. Additionally, a complete test suite scaffold (ohosTest) has been added, featuring a TestAbility and OpenHarmonyTestRunner to support automated testing of the application.

_frb\_example/flutter\_via\create/ohos/entry · high confidence

Rust wire code generation now supports platform-specific modules and configurable output

The Rust wire code generator has been restructured to produce a single output file that conditionally includes platform-specific modules. Common code is emitted alongside \io\ (non-Wasm) and \web\ (Wasm) modules, wrapped in \\#\[cfg\]\ attributes to ensure the correct code is compiled for the target platform. The generation process is driven by a new \GeneratorWireRustInternalConfig\ that allows users to control the output path, enable or disable WebAssembly support, set C symbol prefixes, and configure codec modes. Additionally, the generator now filters extern functions and classes based on whether \ffigen\ is enabled, ensuring that only necessary bindings are included in the final Rust code.

_frb\codegen/src/library/codegen/generator/wire/rust · high confidence

Support for Native Assets integration backend

The codegen integrator now supports the Native Assets integration backend alongside the existing Cargokit backend. When Native Assets is selected, the integration process applies specific overlay templates (shared and plugin-specific), adds the \flutter\_rust\_bridge\_hooks\ dependency to the project's pubspec, and configures the necessary hooks. This allows users to integrate Rust libraries using Flutter's native assets mechanism instead of the previous Cargokit-based approach.

_frb\codegen/src/library/integration/integrator · high confidence

Support for generating getters from Rust constants

The code generator now creates getter functions for public Rust constants found in the source code. This new module parses constant items, validates their visibility and attributes, and generates corresponding MIR function entries that expose the constant's value to Dart as a synchronous getter.

_frb\_codegen/src/library/codegen/parser/mir/parser/function/const\getter · high confidence

Support for generic type alias substitution in code generation

The code generator now correctly handles generic type aliases, ensuring they expand to their underlying types at the use site. This allows users to define custom generic aliases (such as \AppResult\<T\>\ expanding to \Result\<T, AppError\>\ or \Wrapper\<T\>\ expanding to \Option\<T\>\) and have the generated code resolve them accurately, rather than treating them as opaque or failing to parse.

_frb\_codegen/test\_fixtures/library/codegen/parser/mod/generic\_type\alias · high confidence

Web platform WASM module initialization with cross-origin safety checks

The web-specific implementation for loading the WASM module has been added to handle script injection and WASM binding initialization. This change ensures that the module loads correctly in web workers by dynamically appending the JavaScript loader script and invoking the WASM bindgen function. Additionally, it includes a safety check for the \crossOriginIsolated\ environment; if this setting is missing or false, a warning is logged to the console to alert users that shared buffers may not be supported, preventing silent failures due to missing security headers.

_frb\_dart/lib/src/wasm\module · high confidence

Architecture

Introduce IR module structure

The code generation intermediate representation (IR) is now organized into a dedicated module containing early\_generator, hir, mir, and misc sub-modules, establishing a clearer structural foundation for the code generation pipeline.

_frb\codegen/src/library/codegen/ir · high confidence

Parser refactored into distinct HIR and MIR stages with internal configuration

The code generation parser has been restructured to separate the parsing process into two distinct intermediate representation stages: a High-Level IR (HIR) and a Middle-Level IR (MIR). This change introduces a new \ParserInternalConfig\ that explicitly manages configuration for both the HIR and MIR phases, replacing the previous monolithic approach. The parser now executes a pipeline that reads raw input into HIR, processes it through tree and flat representations, runs an early generator, and finally produces the MIR output. This structural shift allows for more granular control over the parsing logic and better separation of concerns between the initial syntax analysis and the subsequent semantic modeling.

_frb\codegen/src/library/codegen/parser · high confidence

Refactored Rust wire type generation into a modular trait-based architecture

The Rust wire code generator for miscellaneous types has been restructured from a monolithic implementation into a modular system using the \WireRustGeneratorMiscTrait\. This change introduces dedicated generator structs for each type category—such as \DartFnWireRustGenerator\, \RustOpaqueWireRustGenerator\, \StructRefWireRustGenerator\, and \EnumRefWireRustGenerator\—which implement specific logic for generating imports, static checks, and wire function decoders. This refactoring improves code organization and maintainability by isolating the generation logic for each type, while preserving the existing behavior for Dart-to-Rust wire communication.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/misc/ty · high confidence

Reorganized codegen into library and binary crates

The codegen logic has been split into a library crate (frb\_codegen/src/lib.rs) and a binary crate (frb\_codegen/src/main.rs). The library exposes the core code generation and integration APIs, while the binary provides a thin CLI wrapper using Clap. This separation allows the codegen functionality to be used as a library by other Rust projects, while the CLI remains a simple entry point for command-line usage.

_frb\codegen/src · high confidence

Behavioural changes

Add MIR transformers for dynamic trait handling and trait impl filtering

The code generation pipeline now includes two new MIR (Mid-level Intermediate Representation) transformers. The \filter\_trait\_impl\_transformer\ removes trait implementations from the MIR pack if their implementation types are not present in the set of distinct types, ensuring only relevant implementations are processed. The \dyn\_trait\_inner\_transformer\ (currently commented out but structurally defined) is designed to handle dynamic traits by converting them into enums, mapping trait implementations to enum variants. These changes refine how the code generator processes and filters type information before final code emission.

_frb\codegen/src/library/codegen/parser/mir/transformer · high confidence

Added Xcode scheme for macOS Runner

The macOS Runner project now includes a defined Xcode scheme (Runner.xcscheme) that configures the build, test, launch, profile, analyze, and archive actions. This scheme sets up a pre-action to prepare the Flutter framework via the macos\_assemble.sh script and specifies the primary buildable as the Runner app, enabling proper development and CI workflows for the macOS target.

_frb\_example/flutter\_via\_create/macos/Runner.xcodeproj/xcshareddata, frb\_example/flutter\_via\integrate/macos/Runner.xcodeproj/xcshareddata · high confidence

Added dummy source files for iOS and macOS framework generation

Empty C source files have been added to the iOS and macOS Classes directories within the rust\_builder. These files serve as placeholders to ensure that CocoaPods generates a framework for the platform-specific builds, addressing potential integration issues where the absence of source files might prevent proper framework creation.

_frb\_example/flutter\_via\_integrate/rust\_builder/ios, frb\_example/flutter\_via\_integrate/rust\builder/macos · high confidence

Added dummy source files for iOS and macOS platforms

Empty C source files have been added to the iOS and macOS Classes directories to ensure CocoaPods generates a framework for the Flutter plugin.

_frb\_example/flutter\_package/ios, frb\_example/flutter\package/macos · high confidence

Added macOS workspace configuration files

The macOS project now includes the standard Xcode workspace structure, specifically the \contents.xcworkspacedata\ file that references the \Runner.xcodeproj\ and the \IDEWorkspaceChecks.plist\ file to suppress the 32-bit warning. These files are generated by the Flutter tooling to ensure the macOS target builds correctly within the Xcode environment.

_frb\_example/flutter\_via\_create/macos/Runner.xcworkspace, frb\_example/flutter\_via\integrate/macos/Runner.xcworkspace · high confidence

Added native assets build hook for Dart 3.10+ compatibility

The example project now includes a dedicated build hook script (build.dart) that invokes the standard build utility. This change ensures the example correctly integrates with Dart 3.10+ native assets requirements, allowing the Rust bridge to build successfully on newer Dart versions.

_frb\_example/dart\_build\rs/hook · high confidence

The .agents/skills path is now a symbolic link pointing to ../.claude/skills. This change redirects where the agent looks for skill definitions, effectively moving the source of truth to the .claude/skills directory while maintaining the .agents/skills interface.

.agents · high confidence

Android project scaffolding and Gradle upgrade for Rust UI Counter

The Android module for the Rust UI Counter example has been initialized with standard Flutter Android project files, including the main AndroidManifest, MainActivity, launch themes, and resource styles. Additionally, the Gradle wrapper has been updated to version 9.3.1, ensuring the build environment uses the latest distribution.

_frb\_example/rust\_ui\counter/ui/android · high confidence

DCO encoder generates IntoDart implementations for Mir types

The DCO (DartCObject) encoder now produces Rust code that implements the \flutter\_rust\_bridge::IntoDart\ trait for generated types. This is achieved by iterating over the provided \MirType\ list and calling \generate\_impl\_into\_dart\ for each, which emits the necessary trait implementations along with codec comments. A new \misc\ module supports this by providing helper functions to generate the \IntoDart\ and \IntoIntoDart\ trait blocks, including logic to handle wrapper types via identity or conversion calls.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/dco/encoder · high confidence

Dart code generator refactored with new configuration and output structure

The Dart API code generator has been restructured to use a new internal configuration model (GeneratorApiDartInternalConfig) and a two-stage generation process (spec then text). This introduces opt-in deep equality for Dart collections, configurable enum styling, and support for Dart 3. Output paths are now computed dynamically based on namespaces, placing self-crate roots as lib.dart and external crates under a third\_party directory. Generated files include a customizable preamble, proper imports for freezed and json\_serializable, and sorted function implementations.

_frb\_codegen/src/library/codegen/generator/api\dart · high confidence

Dart wire class generation now supports manual FFI and fixes ffigen 21 compatibility

The Dart code generator for wire classes now offers two generation paths: it can still use ffigen, but also supports a new manual FFI path for simple void-pointer functions when ffigen is disabled. When using ffigen, the generator now post-processes the output to remove obsolete structs introduced in ffigen 21 (such as \WireSyncRust2DartSse\), preventing parser errors in the generated Dart code. This ensures that generated wire classes are compatible with both legacy and newer ffigen versions, while also enabling direct symbol lookup for supported manual FFI signatures.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\_generator/wire\class/io · high confidence

Generated flutter\_via\_create example scaffold updated to Flutter stable and flutter\_rust\_bridge 2.14.0-beta.2

The flutter\_via\_create example project has been regenerated to align with the Flutter stable channel (revision 4cf24164269a5ebf0c16a028a00727d0e77bbb05) and flutter\_rust\_bridge version 2.14.0-beta.2. This update refreshes the generated Dart entrypoints and bindings (including frb\_generated.dart and frb\_generated.web.dart) to use the dart.library.js\_interop import for web support, and updates the macOS platform metadata and configuration files to match the current stable toolchain standards.

_frb\_example/flutter\_via\create · high confidence

Improved CLI command execution with process tree cleanup and environment control

The CLI now uses a new \runCommand\ utility that provides better control over external process execution. Users will benefit from automatic cleanup of child processes when a command times out, preventing orphaned processes. The tool also supports filtering parent environment variables to prevent flag inheritance (useful for tools like wasm-pack), allows optional exit code checking, and ensures output is flushed immediately to the console. Additionally, a new utility helps locate the Dart package directory by traversing up from a starting path.

_frb\dart/lib/src/cli · high confidence

Improved lifetime management and Result alias safety in generated Rust wire code

The Rust wire code generator now correctly handles complex lifetime scenarios by introducing dedicated logic for lifetime extension and lockable decoding, ensuring that borrowed opaque types are managed safely via ouroboros bindings and lockable guards. Additionally, the generator now uses the prelude \Ok\ variant instead of \std::result::Result\ when wrapping infallible function calls, preventing breakage if user code shadows the standard \Result\ type.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/misc/function · high confidence

Introduce CST-based codec for Rust wire decoding

The Rust wire code generator now includes a new Common Syntax Tree (CST) codec implementation for decoding data. This change adds a dedicated entry point and decoder module that processes input types using the \CstDecode\ trait, allowing the generated Rust code to handle function arguments via a new decoding path distinct from previous methods. The entry point specifically enables this decoding logic for the Rust target while leaving encoding to return no output, effectively shifting how incoming wire data is interpreted during code generation.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/cst · high confidence

Introduce namespace-aware Dart API spec generator

The Dart API code generator has been restructured to be namespace-aware, organizing generated functions and classes by their Rust namespace. This change introduces a new \ApiDartOutputSpec\ structure that groups items by namespace, ensuring that generated Dart code correctly handles imports and avoids naming conflicts across different modules. The generator now produces a dump of the API specification for debugging and includes a sanity check to detect duplicate class names, which can occur when types are ambiguously inferred as opaque or non-opaque.

_frb\_codegen/src/library/codegen/generator/api\_dart/spec\generator · high confidence

Introduce structured command execution and formatting helpers

The codegen library now includes a dedicated command execution framework and specific helpers for managing external tooling. A new \command\_runner\ module provides a macro-based DSL for running shell commands with support for conditional arguments, working directories, and environment variables, alongside improved Windows PowerShell escaping. New modules handle specific tasks: \dart\_fix\ and \dart\_format\ now run \dart fix --apply\ and \dart format\ respectively; \dart\_build\_runner\ is updated to filter outputs to generated files (e.g., \.freezed.dart\, \.g.dart\); \ffigen\ and \cbindgen\ now write to temporary files before reading results; \flutter\ commands support HarmonyOS (OHOS) detection and platform resolution; and \cargo\ helpers manage \cargo add\ and \cargo fetch\ with workspace-aware error handling.

_frb\codegen/src/library/commands · high confidence

Introduces a command runner entry point for the CLI tool

The main entry point in frb\_dart/bin/flutter\_rust\_bridge.dart has been updated to use a command runner pattern. It now initializes a CommandRunner with a message indicating the tool is typically invoked via flutter\_rust\_bridge\_codegen, and registers the BuildWebCommand. This changes how the CLI tool is structured and executed, delegating command handling to the registered BuildWebCommand.

_frb\dart/bin · high confidence

Introduces new codec architecture with BaseCodec, SseCodec, and DcoCodec

The codec layer in \frb\_dart/lib/src/codec\ has been restructured to support two distinct serialization protocols: SSE (for standard async calls) and DCO (for sync calls). A new \BaseCodec\ abstract class defines the interface for decoding Rust-to-Dart messages, implemented by \SseCodec\ (which uses \SseSerializer\ and \SseDeserializer\ for buffer management) and \DcoCodec\ (which handles direct object encoding). The \SseSerializer\ now includes a \dispose()\ method to release memory when Dart encoding throws, preventing leaks. Additionally, \pde.dart\ introduces \pdeCallFfi\ to handle FFI dispatch for both primary (async) and sync modes, while \base.dart\ adds a \CloseStreamException\ and a \SimpleDecoder\ helper to unify action handling (success, error, panic, close stream) across decoders.

_frb\dart/lib/src/codec · high confidence

Introduces platform-specific type definitions and library loading for Dart IO and Web

The library now defines distinct platform implementations for core types: the IO backend uses \dart:ffi\ for \PlatformPointer\ and \NativePortType\, while the Web backend switches to \dart:js\_interop\ (replacing the previous \dart:html\ dependency) and uses \BigInt\ for 64-bit integers. It also introduces an \ExternalLibrary\ abstraction that loads native dynamic libraries on IO and configures the Wasm bindgen module name on Web, alongside utility classes for pointer and integer conversions.

_frb\_dart/lib/src/platform\types · high confidence

Introduces structured codec mode definitions and delegation logic

The code generation system now explicitly defines codec modes (Cst, Dco, Sse, Pde) and a configuration pack for Dart-to-Rust and Rust-to-Dart directions. A key behavioral change is that the Pde mode automatically delegates to Sse, ensuring consistent serialization behavior. The module also establishes how interest types are selected for each mode, with Cst using cached distinct types and Dco/Sse using global types, while Pde currently selects none.

_frb\codegen/src/library/codegen/generator/codec · high confidence

Introduction of Dart codec entrypoint traits and module structure

The code generation module for Dart codecs has been reorganized to introduce a new \WireDartCodecEntrypointTrait\ in \base.rs\, which defines the \generate\_dart2rust\_inner\_func\_stmt\ method for encoding and decoding logic. This trait extends the existing \BaseCodecEntrypointTrait\ and is implemented by specific codec entrypoints (CST, DCO, PDE, SSE) now exposed through the updated \mod.rs\ structure, enabling the generator to produce the necessary Dart-to-Rust function statements for wire protocol communication.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/codec · high confidence

Macro expansion now supports feature flags and auto-installs cargo-expand

The codegen command for expanding Rust macros now accepts an optional list of feature flags, allowing users to control which crate features are active during expansion. Additionally, the tool automatically installs the \cargo-expand\ CLI if it is missing, with a fallback to a specific older version (1.0.112) if the latest version is incompatible with the current Rust toolchain.

_frb\_codegen/src/library/commands/cargo\expand · high confidence

Native assets examples updated to flutter\_rust\_bridge 2.14.0-beta.2

The Rust source files for the \flutter\_package\_native\_assets\, \flutter\_via\_create\_native\_assets\, and \flutter\_via\_integrate\_native\_assets\ example projects have been regenerated to use flutter\_rust\_bridge version 2.14.0-beta.2. This update synchronizes the generated bridge code (\frb\_generated.rs\) and API modules (\api/simple.rs\) across these examples, ensuring they align with the latest code generation backend and versioning.

_frb\_example/flutter\_package\_native\_assets/rust, frb\_example/flutter\_via\_create\_native\_assets/rust, frb\_example/flutter\_via\_integrate\_native\assets/rust · high confidence

Native assets integration template and Android example scaffolding

The \flutter\_rust\_bridge\ integration template now includes support for the native assets build backend. This adds a \hook/build.dart\ script that invokes \FlutterRustBridgeNativeAssetsBuilder\ to compile and bundle Rust crates during the Flutter build process, along with a \rust-toolchain.toml\ pinning the Rust toolchain to version 1.93.1 for reproducible builds across multiple platforms. Additionally, the \flutter\_package\_native\_assets\ example project has been regenerated with a complete Android application scaffold, including \AndroidManifest.xml\ files, \MainActivity.kt\, and standard launch theme resources, providing a working reference for packages using this new native assets integration.

_frb\_codegen/assets/integration\_template/native\_assets, frb\_example/flutter\_package\_native\assets/example/android · high confidence

New CLI command structure and configuration parsing for codegen

The codegen binary now exposes a structured command-line interface with distinct subcommands (Generate, Create, Integrate, BuildWeb) and a dedicated parser that merges configuration from explicit YAML files, auto-detected project files, and CLI flags. This allows users to configure code generation via a \--config-file\ argument or automatic detection, while also supporting granular control over Dart and Rust output paths, formatting options, and feature flags like \--dart-collection-deep-equality\ and \--no-dart-enums-style\.

_frb\codegen/src/binary · high confidence

New MIR function parser implementation with lifetime and ownership handling

The code generator now uses a new MIR function parser located in \frb\_codegen/src/library/codegen/parser/mir/parser/function/real\ to process Rust functions. This parser introduces support for Rust lifetimes by extracting and validating them, ensuring that only functions with at most one distinct named lifetime are processed. It also handles argument ownership modes (e.g., \&\, \&mut\, owned) and automatically boxes struct/enum/record types. The parser includes logic to skip functions with multiple distinct lifetimes, ignore non-public functions, and handle proxy types and primitive unit returns.

_frb\codegen/src/library/codegen/parser/mir/parser/function/real · high confidence

New build-web CLI with explicit Dart Wasm support and coverage-safe environment handling

The \build-web\ command now supports compiling Dart to WebAssembly via the new \--dart-compile-wasm-entrypoint\ flag, in addition to the existing JavaScript compilation. To ensure builds remain deterministic and compatible with tools like \cargo-llvm-cov\, the CLI automatically clears coverage-related environment variables (such as \LLVM\_PROFILE\_FILE\ and \CARGO\_LLVM\_COV\) and Rust flags when invoking \wasm-pack\, preventing inherited state from breaking the build. Users can also configure the Rust toolchain, pass custom flags to \cargo\ and \wasm-bindgen\, and specify the Rust crate directory.

_frb\_dart/lib/src/cli/build\web · high confidence

New exception hierarchy and task execution model

The library introduces a structured exception hierarchy (FrbException, PanicException, AnyhowException, etc.) to provide clearer error reporting for Rust panics and errors, alongside a new task-based execution model (BaseTask, NormalTask, SyncTask) that standardizes how FFI calls are wrapped and dispatched, improving consistency and maintainability for generated code.

_frb\dart/lib/src · high confidence

Preparer module introduced to centralize tool availability checks

A new preparer module has been added to the codegen library, introducing an internal configuration struct that holds the Dart root path and flags for dependency and FFIgen checks. This module now serves as the entry point for the preparation phase, delegating to a shared utility to ensure required tools are available before code generation proceeds.

_frb\codegen/src/library/codegen/preparer · high confidence

Pure Dart PDE example regenerated with new API surface

The Rust source files for the pure\_dart\_pde example have been regenerated, introducing a comprehensive set of new API modules. This includes support for fixed-size arrays, 64-bit integer casting, custom serializers for types like Ipv4Addr, deep collection equality, and various async/spawn patterns. The update also adds examples for Dart opaque types, event listeners, custom initialization hooks, and external type mirroring, ensuring the example covers the latest code generation capabilities.

_frb\_example/pure\_dart\pde/rust · high confidence

Refactor C wire code generation into modular spec components

The C wire code generation logic has been restructured into distinct modules (\cbindgen\_executor\, \dummy\_function\, and \mod.rs\) to improve maintainability. This change introduces a \WireCOutputSpec\ that separates the generated C bindings (via cbindgen) from the dummy bundling function. The dummy function generator now explicitly sorts and deduplicates external symbol names before emitting references, ensuring consistent output and preventing duplicate symbol errors. Additionally, the cbindgen executor now injects specific type definitions (such as \WireSyncRust2DartSse\ and \DartPort\) and the \store\_dart\_post\_cobject\ declaration into the generated C header to ensure compatibility with the Dart FFI layer.

_frb\_codegen/src/library/codegen/generator/wire/c/spec\generator · high confidence

Refactor Dart code generation to use a task-based execution model

The Dart code generator has been restructured to replace direct FFI calls with a task-based execution model. Generated API implementation methods now wrap FFI invocations in \NormalTask\ or \SyncTask\ objects, which are dispatched via a handler's \executeNormal\ or \executeSync\ methods. This change introduces a new \api\_impl\_body\ generator that constructs these task wrappers, handles codec configuration for data serialization, and manages async/await flow for stream-returning functions. The entrypoint class also gains an \executeRustInitializers\ method to run Rust-side initializers through this same handler mechanism, centralizing execution logic.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/misc · high confidence

Refactor Dart wire code generation to use a new spec generator and MIR-based context

The Dart wire code generator has been restructured to use a new \spec\_generator\ module that operates on the Mid-level IR (Mir) instead of the previous Intermediate Representation (Ir). This change introduces a new \WireDartGeneratorContext\ to manage configuration and MIR data, and replaces the old \DartBasicCode\ structure with a more granular \WireDartOutputCode\ that explicitly separates headers, API class bodies, and implementation methods. The generator now produces a \WireDartOutputSpec\ containing distinct sections for misc, Rust-to-Dart, and Dart-to-Rust codecs, and includes logic to automatically distribute abstract method signatures from common code to platform-specific implementations. Additionally, a new dump feature serializes type mapping information for debugging and verification purposes.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator · high confidence

Refactor code generation to use MIR and structured output

The code generator now operates on a Middle Intermediate Representation (MIR) instead of the previous IR, consolidating the generation process into a single entry point that produces a structured \GeneratorOutput\ containing combined output texts and flags for required dependencies (Freezed, JSON Serializable). This change introduces a new \Acc\ accumulator type to manage code generation results across different targets (Common, IO, Web) and reorganizes the module structure to support this new flow.

_frb\codegen/src/library/codegen/generator · high confidence

Refactored Dart class code generation to use the MIR intermediate representation

The Dart API code generator for classes has been migrated from the IR to the MIR (Mid-level IR) layer, introducing new dedicated modules for handling fields, methods, and proxy variants. This change updates how Dart classes are generated: fields now correctly apply \required\ modifiers and handle default values (including Freezed annotations and Dart-style enum casing), methods are generated with support for static/instance modes and default constructor postfixes (\.raw\), and proxy variants are wrapped in \Future.value\ for async modes. The \ApiDartGeneratedClass\ struct now explicitly tracks dependencies on \freezed\ and \json\_serializable\ packages.

_frb\_codegen/src/library/codegen/generator/api\_dart/spec\generator/class · high confidence

Refactored Dart wire-type spec generators into a modular trait-based structure

The Dart codegen for wire types has been reorganized into a modular, trait-based architecture under \frb\_codegen/src/library/codegen/generator/wire/dart/spec\_generator/misc/ty\. A new \WireDartGeneratorMiscTrait\ dispatches generation logic across dedicated modules for each type (e.g., \dart\_fn\, \rust\_opaque\, \structure\, \enumeration\). This refactoring introduces specific behavioral improvements: Dart function callbacks now include explicit serializer cleanup and disposal on encoding errors to prevent resource leaks, and Rust opaque types now generate explicit Dart-side functions to increment and decrement the underlying Rust \Arc\ strong count, ensuring correct memory management across the FFI boundary.

_frb\_codegen/src/library/codegen/generator/wire/dart/spec\generator/misc/ty · high confidence

Refactored Rust DCO encoder to use a modular type-specific trait structure

The Rust wire-code generation for DCO (Dart-to-Rust) encoding has been restructured to improve maintainability and correctness. The encoder logic is now organized into a \WireRustCodecDcoGeneratorEncoderTrait\ with dedicated implementations for each data type (e.g., \DelegateWireRustCodecDcoGenerator\, \EnumRefWireRustCodecDcoGenerator\, \StructRefWireRustCodecDcoGenerator\). This change ensures that complex types like enums and structures generate correct \into\_dart\ and \into\_into\_dart\ conversions, and that implicit opaque types are only encoded when they are owned. The refactoring also includes unit tests to verify the correct handling of wrapper names and ownership modes.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator/codec/dco/encoder/ty · high confidence

Refactored codegen configuration parsing with new modular parsers and migration support

The internal configuration parser has been restructured into dedicated modules (controller, dart path, generator, rust path) to improve maintainability and testability. A key behavioral change is the migration of the \rust\input\ configuration field: legacy glob patterns (e.g., \rust/src/api/\\/\.rs\) are now automatically migrated to the new Rust module path syntax (e.g., \crate::api\) with an explicit \rust\_root\, while unsupported glob patterns in the new syntax are rejected with a clear error message. The parser now also handles Dart output path computation, splitting paths into platform-specific variants (common, io, web) and computing default external library loaders and symbol prefixes based on the Dart package name.

_frb\_codegen/src/library/codegen/config/internal\_config\parser · high confidence

Refactored core runtime components into modular service classes

The main\_components module has been restructured to improve modularity and testability. The initialization logic is now centralized in a new BaseEntrypoint class, which manages the lifecycle of the GeneralizedFrbRustBinding, PortManager, and API implementation. A new BaseHandler class explicitly manages Dart-Rust call execution, including closing response ports when native calls throw to prevent resource leaks. The PortManager now encapsulates the DartHandlerPortManager for handling Rust-to-Dart invocations, and new abstract BaseApi and BaseWire classes define the interfaces for generated code. These changes provide a cleaner separation of concerns for the bridge's core services.

_frb\_dart/lib/src/main\components · high confidence

Refreshed Windows runner scaffolding for Flutter 3.44

The Windows runner files in the example project have been regenerated to align with the Flutter 3.44 tooling. This update includes a new CMake build configuration, updated resource scripts that correctly embed Flutter version metadata, and refreshed C++ source files for window management and UTF-16 command-line argument handling. Users building the Windows example will benefit from improved high-DPI scaling support and more robust console output redirection.

_frb\_example/flutter\_package/example/windows/runner, frb\_example/flutter\_via\_create/windows/runner, frb\_example/flutter\_via\integrate/windows/runner · high confidence

Regenerate macOS Flutter scaffold files

The macOS Flutter scaffold files in the example project have been regenerated to align with the current Flutter tooling. This includes restoring the xcconfig includes for CocoaPods and ephemeral generated configs in both Debug and Release modes, and updating the GeneratedPluginRegistrant.swift to match the expected structure for plugin registration.

_frb\_example/flutter\_via\create/macos/Flutter · high confidence

Regenerated Android example app scaffolding

The Android example app scaffolding has been regenerated to align with the current CI toolchain and integration standards. This update adds standard Flutter Android project files, including the main AndroidManifest.xml with Flutter v2 embedding configuration, a Kotlin MainActivity extending FlutterActivity, debug and profile manifests with INTERNET permission, and standard launch theme resources. A .gitignore file is also added to exclude build artifacts and sensitive keystore files.

_frb\_example/flutter\_package/example, frb\_example/flutter\package/example/android · high confidence

Regenerated Android project scaffolding for Flutter V2 embedding

The Android project files for the flutter\_via\_create example have been regenerated to align with the current Flutter toolchain and CI requirements. This update introduces the standard Flutter V2 Android embedding structure, including a MainActivity extending FlutterActivity, updated AndroidManifest.xml files with the flutterEmbedding meta-data, and new resource definitions for launch and normal themes (supporting both light and dark modes). It also adds a .gitignore file to exclude generated Gradle and build artifacts, ensuring the project structure matches the output of a fresh flutter create command.

_frb\_example/flutter\_via\create/android · high confidence

Regenerated Android project scaffolding for the integrate example

The Android project files for the \flutter\_via\_integrate\ example have been regenerated to align with the current CI toolchain and Flutter standards. This update introduces the standard V2 Flutter Android embedding configuration, including a \MainActivity\ extending \FlutterActivity\, updated \AndroidManifest.xml\ files with the \flutterEmbedding\ meta-data and necessary internet permissions for debug/profile builds, and modernized launch theme resources supporting both light and dark modes.

_frb\_example/flutter\_via\_integrate/android, frb\_example/flutter\_via\integrate/macos/Runner · high confidence

Regenerated Dart bindings and Flutter project scaffolding for rust\_ui\_counter

The \frb\_example/rust\_ui\_counter/ui\ directory has been refreshed with newly generated Flutter project files and Flutter Rust Bridge (FRB) Dart bindings. The generated Dart code in \lib/src/rust/\ (including \app.dart\, \frb\_generated.dart\, and platform-specific variants) is now produced by FRB version 2.14.0-beta.2, updating the API layer that exposes the Rust \RustState\ counter logic to the Flutter UI. Additionally, the underlying Flutter project structure has been regenerated, including updated Linux platform files (CMakeLists, application entry points) and configuration files (\.gitignore\, \analysis\_options.yaml\, \flutter\_rust\_bridge.yaml\) to align with the current toolchain and FRB configuration.

_frb\_example/rust\_ui\counter/ui · high confidence

Regenerated macOS Flutter scaffold files

The macOS example project's Flutter scaffold has been regenerated, introducing new xcconfig files (Flutter-Debug.xcconfig and Flutter-Release.xcconfig) that include CocoaPods and ephemeral generated configurations, and updating GeneratedPluginRegistrant.swift to its current standard structure. This ensures the macOS build environment is correctly aligned with the current Flutter tooling and dependency management setup.

_frb\_example/flutter\_package/example/macos/Flutter, frb\_example/flutter\_via\integrate/macos/Flutter · high confidence

Regenerated macOS Runner project files

The macOS example application's native project files have been regenerated to align with the updated cargokit integration. This update includes a new AppDelegate configuration that supports secure restorable state, a standard macOS main menu interface, and updated build configurations (Debug, Release, and Warnings) that enforce stricter compiler checks. Additionally, the app bundle now includes a complete set of icon assets and entitlements that enable app sandboxing, JIT execution, and network server access for development.

_frb\_example/flutter\package/example/macos/Runner · high confidence

Regenerated macOS Xcode project for Flutter 3.44/3.47 toolchains

The macOS Runner project file (project.pbxproj) has been regenerated to align with the updated Flutter toolchains (versions 3.44 and 3.47) and the upgraded Cargokit integration. This update refreshes the native build configuration, including the 'Flutter Assemble' aggregate target, plugin registration via GeneratedPluginRegistrant.swift, and the associated xcconfig files, ensuring the example app builds correctly against the new framework standards.

_frb\_example/flutter\_via\integrate/macos/Runner.xcodeproj · medium confidence

Reorganize library module structure

The library module has been restructured to explicitly expose sub-modules for build\_web, codegen, integration, internal, misc, and utils, while keeping commands as a private module. This change clarifies the public API surface of the code generation library.

_frb\codegen/src/library · high confidence

Restored iOS Flutter build configuration files

The iOS example project now includes the necessary Flutter build configuration files (AppFrameworkInfo.plist, Debug.xcconfig, and Release.xcconfig) in the Flutter directory. This ensures that the example app can correctly resolve CocoaPods dependencies and link the Flutter framework during debug and release builds.

_frb\_example/flutter\package/example/ios/Flutter · high confidence

Restored iOS Flutter scaffold configuration files

The iOS example project for flutter\_via\_create has been restored with essential Flutter build configuration files. This includes AppFrameworkInfo.plist, which defines the Flutter app framework metadata, and the Debug.xcconfig and Release.xcconfig files that configure the build environment to include generated settings and CocoaPods support. These changes ensure the iOS platform can correctly build and link the Flutter engine within the example application.

_frb\_example/flutter\_via\_create/ios/Flutter, frb\_example/flutter\_via\integrate/ios/Flutter · high confidence

Restored iOS Runner scaffolding for the Flutter via integrate example

The iOS platform files for the \flutter\_via\_integrate\ example have been restored to their standard state. This includes the \AppDelegate\ and \SceneDelegate\ implementations, the \Info.plist\ configuration, and the necessary asset catalogs and storyboards for the app icon and launch screen. This ensures the example project builds and runs correctly on iOS with the expected native entry points.

_frb\_example/flutter\_via\integrate/ios/Runner · high confidence

Restored iOS Xcode scheme for Flutter example app

The Xcode scheme configuration for the iOS Runner example project has been restored, enabling the app to be built, run, tested, and archived within Xcode. This change re-introduces the necessary build actions and launch settings, including the pre-action script to prepare the Flutter framework, ensuring the example project functions correctly for iOS development.

_frb\_example/flutter\package/example/ios/Runner.xcodeproj/xcshareddata · high confidence

Restored iOS Xcode scheme for Flutter example project

The iOS example project for Flutter now includes a properly configured Xcode scheme (Runner.xcscheme) that enables building, running, testing, and archiving the Runner app. This scheme includes a pre-action script to prepare the Flutter framework and is configured to run the RunnerTests bundle, ensuring the iOS scaffold is functional for development and CI workflows.

_frb\_example/flutter\_via\create/ios/Runner.xcodeproj/xcshareddata · high confidence

Restored iOS Xcode scheme for the Flutter Runner example

The Xcode scheme file for the \flutter\_via\_integrate\ iOS example has been restored, re-enabling the ability to build, run, test, and archive the \Runner.app\ target directly within Xcode. This change reinstates the standard build actions and pre-actions required for the Flutter framework integration, ensuring the example project is functional for local development and CI workflows.

_frb\_example/flutter\_via\integrate/ios/Runner.xcodeproj/xcshareddata · high confidence

Restored iOS example project scaffolding

The iOS example project for the Flutter package has been restored to a functional state. This change re-introduces the standard Xcode project structure, including the main Runner target, the associated unit test target (RunnerTests), and essential configuration files such as the Info.plist, storyboards, and asset catalogs. It also ensures that the project correctly references the Flutter engine and generated plugin registrant, allowing developers to build and run the example app on iOS devices and simulators again.

_frb\_example/flutter\_package/example/ios/Runner, frb\_example/flutter\package/example/ios/Runner.xcodeproj · high confidence

Restored iOS example project workspace scaffolding

The iOS example project scaffolding has been restored, adding the necessary Xcode workspace configuration files (including \contents.xcworkspacedata\, \IDEWorkspaceChecks.plist\, and \WorkspaceSettings.xcsettings\) for both the \Runner.xcodeproj\ and the top-level \Runner.xcworkspace\. This ensures the Flutter example app can be opened and built in Xcode without workspace configuration errors.

_frb\_example/flutter\_package/example/ios/Runner.xcodeproj/project.xcworkspace, frb\_example/flutter\package/example/ios/Runner.xcworkspace · high confidence

Restored iOS project scaffold for the Flutter example app

The iOS project configuration for the \flutter\_via\_create\ example has been regenerated to ensure compatibility with the current Flutter toolchain. This update restores the \Runner.xcodeproj\ with a modernized structure, including support for Swift package integration via \FlutterGeneratedPluginSwiftPackage\, updated build phases for framework embedding, and refreshed build configurations (Debug/Release.xcconfig) to align with the upgraded Flutter 3.47 environment.

_frb\_example/flutter\_via\create/ios/Runner.xcodeproj · high confidence

Restored iOS project scaffold for the Flutter via integrate example

The iOS project configuration file (project.pbxproj) for the flutter\_via\_integrate example has been restored, re-establishing the native Xcode project structure. This change brings back the standard Runner target, including the AppDelegate and SceneDelegate implementations, Main and LaunchScreen storyboards, asset catalogs, and the necessary build phases to embed frameworks and link the FlutterGeneratedPluginSwiftPackage. It also reinstates the RunnerTests target for unit testing, ensuring the example app can be built and run on iOS devices and simulators again.

_frb\_example/flutter\_via\integrate/ios/Runner.xcodeproj · high confidence

Restored iOS scaffold for the flutter\_via\_create example

The iOS project files for the flutter\_via\_create example have been restored to a functional state. This update adds the necessary iOS scaffolding, including the AppDelegate and SceneDelegate implementations, standard asset catalogs for app icons and launch screens, and the Info.plist configuration, ensuring the example app can be built and run on iOS devices.

_frb\_example/flutter\_via\_create/ios/Runner, frb\_example/flutter\_via\create/ohos · high confidence

Restored iOS workspace configuration files

The iOS workspace for the Flutter example app has been restored with its standard configuration files. This includes the workspace data file linking the Runner project, the workspace settings disabling Xcode Previews, and the IDE workspace checks plist. These changes ensure the Xcode workspace is correctly structured for building and running the example application.

_frb\_example/flutter\_via\_integrate/ios/Runner.xcodeproj/project.xcworkspace, frb\_example/flutter\_via\integrate/ios/Runner.xcworkspace · high confidence

Restored iOS workspace configuration for the Flutter example project

The iOS workspace scaffolding for the \flutter\_via\_create\ example has been restored to enable Xcode builds. This change re-adds the necessary workspace files (\contents.xcworkspacedata\, \IDEWorkspaceChecks.plist\, and \WorkspaceSettings.xcsettings\) for both the project-level and root-level workspaces, ensuring the Xcode project is correctly referenced and build settings (such as disabling previews) are applied.

_frb\_example/flutter\_package/example/macos/Runner.xcworkspace, frb\_example/flutter\_via\_create/ios/Runner.xcodeproj/project.xcworkspace, frb\_example/flutter\_via\create/ios/Runner.xcworkspace · high confidence

Restructured HIR module organization

The High-Level Intermediate Representation (HIR) module has been reorganized to expose five distinct sub-modules: flat, misc, naive\_flat, raw, and tree. This change consolidates the internal structure of the HIR code generation layer, making these specific components directly accessible within the hir namespace for downstream consumers of the intermediate representation.

_frb\codegen/src/library/codegen/ir/hir · high confidence

Restructured Rust integration template with explicit API module

The shared Rust integration template has been reorganized to improve modularity. The \lib.rs\ entry point now explicitly declares the \api\ module, which is exposed via a new \src/api/mod.rs\ file. This module contains \src/api/simple.rs\, defining the demo \greet\ function and the \init\_app\ initialization routine. The generated \frb\_generated.rs\ file has been updated to wire these specific API functions into the FFI dispatchers, ensuring that the generated code correctly routes calls to the newly structured API layer.

_frb\_codegen/assets/integration\_template/shared/shared/REPLACE\_ME\_RUST\_CRATE\DIR · high confidence

Restructured integration templates by backend

The integration templates have been reorganized to separate backend-specific implementations. A new OpenHarmony (OHOS) backend template has been added under the cargokit plugin, including CMake build configuration, module manifests, and type definitions. The shared plugin template now provides a consolidated Dart library entry point and an example application that initializes the Rust bridge and demonstrates a basic interaction.

_frb\_codegen/assets/integration\_template/cargokit/plugin/ohos, frb\_codegen/assets/integration\_template/shared/plugin, frb\_codegen/assets/integration\template/shared/plugin/example · high confidence

Restructured library exports for generated code and platform separation

The library's public API surface has been reorganized to better separate user-facing components from those required by auto-generated code. A new \flutter\_rust\_bridge.dart\ entry point now exposes only the essential APIs for manual usage (such as \BaseHandler\, \RustStreamSink\, and external library loading). Meanwhile, a new set of entry points (\flutter\_rust\_bridge\_for\_generated\_common.dart\, \\_io.dart\, and \\_web.dart\) consolidates the exports needed by generated code, with conditional imports handling the distinction between Dart IO and Web (js\_interop) platforms. This change also introduces a dedicated logging export in the generated code entry point and ensures that platform-specific implementations for opaque types and finalizers are correctly isolated.

_frb\dart/lib · high confidence

Rust wire code generator refactored into a modular spec-based architecture

The Rust wire code generator has been restructured to use a new Intermediate Representation (IR) called MIR and a modular spec-based approach. This change introduces a \WireRustGeneratorContext\ to manage configuration and a \WireRustOutputSpec\ to structure the generated code into distinct sections: misc, Dart-to-Rust codec, Rust-to-Dart codec, and extern struct names. The generator now produces \WireRustOutputCode\ objects that combine body code, extern functions, and extern classes, with specific handling for native (\extern "C"\) and Web (\wasm\_bindgen\) targets. A new dump feature allows users to inspect the generated wire types and modifiers for debugging purposes.

_frb\_codegen/src/library/codegen/generator/wire/rust/spec\generator · high confidence

Simplified build hooks in example projects

The build hooks for the dart\_minimal and pure\_dart example projects have been updated to use a new, simplified format. Instead of complex build logic, these hooks now import flutter\_rust\_bridge\_utils and invoke simpleBuild, reducing boilerplate and aligning with the Dart 3.10+ tooling expectations. The pure\_dart example additionally passes a specific feature flag for testing purposes.

_frb\_example/dart\_minimal/hook, frb\_example/pure\dart/hook · high confidence

Todo List UI regenerated with flutter\_rust\_bridge 2.14.0-beta.2

The Flutter UI for the Rust-backed todo list example has been regenerated to use flutter\_rust\_bridge version 2.14.0-beta.2. This update refreshes the generated Dart bindings (including platform-specific implementations for IO and Web) and the main application entry point, ensuring the UI correctly interfaces with the Rust state management layer for adding, filtering, and managing todo items.

_frb\_example/rust\_ui\_todo\list/ui · high confidence

Updated Cargokit CMake build integration

The Cargokit CMake module has been updated to improve cross-platform build reliability. A new PowerShell script (resolve\_symlinks.ps1) is now included to correctly resolve symlinks on Windows, addressing a known issue where CMake's REALPATH command fails in that environment. The main CMake script (cargokit.cmake) has been refreshed to support building for OpenHarmony (ohos) targets, including specific logic to copy the resulting library to the expected destination, and ensures the build tool script is executable on non-Windows hosts.

_frb\_example/flutter\package/cargokit/cmake · high confidence

Updated Cargokit build tool copies in the Rust builder

The Cargokit build tool source files within the \rust\_builder\ have been synchronized with the upstream Cargokit repository. This update includes the main entry point, Android environment configuration, artifact providers, and platform-specific build scripts (Gradle, CMake, and CocoaPods), ensuring the local build tooling matches the official Cargokit implementation.

_frb\_example/rust\_ui\_counter/ui/rust\_builder/cargokit/build\tool · high confidence

Updated Cargokit build tool integration

The Cargokit build tool used for integrating Rust libraries into the Flutter example has been upgraded to a newer version. This update brings improved handling of Android NDK environments, including better toolchain resolution and support for newer NDK versions (such as those requiring 16KB page alignment). It also enhances the precompiled binary workflow with more robust download retry logic and signature verification, and updates the build logic for CMake, Gradle, and CocoaPods to align with the latest Cargokit standards.

(repo-wide) · medium confidence

Updated Cargokit build tool to latest main

The Cargokit build tool used for compiling Rust libraries in the Flutter/Rust bridge has been synchronized with the latest version of the Cargokit repository. This update brings improvements to the build process, including better handling of Android NDK environments (such as the libgcc workaround for NDK23+), support for precompiled binaries with cryptographic verification, and updated toolchain resolution logic. Users benefit from more reliable builds across different platforms and NDK versions.

_frb\_example/gallery/rust\_builder/cargokit/build\_tool, frb\_example/rust\_ui\_todo\_list/ui/rust\_builder/cargokit/build\tool · high confidence

Updated FFI bindings for Rust-to-Dart communication

The generated FFI header files in the intermediate layer have been refreshed to align with recent internal code generation changes. This includes the addition of \allo\_isolate.h\ to define Dart isolate messaging primitives (such as \DartPostCObjectFnType\) and updates to \frb\_rust.h\ to reflect renamed synchronization structures (e.g., \WireSyncRust2DartSse\ replacing previous naming conventions) and updated function signatures for opaque handle encoding/decoding and vector management.

_frb\_dart/lib/src/ffigen\generated/intermediate · high confidence

Updated Flutter example Rust code to flutter\_rust\_bridge 2.14.0-beta.2

The Rust source files for the flutter\_package example have been regenerated to align with flutter\_rust\_bridge version 2.14.0-beta.2. This update refreshes the generated bindings, including the \frb\_generated.rs\ file which now reflects the new codegen version and content hash, and introduces a new \api/simple.rs\ module exposing a synchronous \greet\ function and an \init\_app\ initializer. The example structure now explicitly organizes these API definitions under \src/api/mod.rs\ and \src/lib.rs\, ensuring the generated FFI dispatchers and serialization codecs (SseCodec) are consistent with the latest template outputs.

_frb\_example/flutter\package/rust · high confidence

Updated Linux and Windows Flutter build configurations for flutter\_package

The example application's Linux and Windows build files have been regenerated to support the flutter\_package. This includes new CMakeLists.txt files that link the Flutter engine and platform-specific libraries (GTK/GLib for Linux, Windows wrappers for Windows), as well as generated plugin registrant files that explicitly register flutter\_package as an FFI plugin on both platforms.

_frb\_example/flutter\_package/example/linux/flutter, frb\_example/flutter\package/example/windows/flutter · high confidence

Updated flutter\_via\_integrate example to Flutter Rust Bridge 2.14.0-beta.2

The flutter\_via\_integrate example has been regenerated with Flutter Rust Bridge version 2.14.0-beta.2. This update refreshes the generated Dart bindings (including frb\_generated.dart, frb\_generated.io.dart, and frb\_generated.web.dart) and the simple API entrypoint, ensuring the example aligns with the latest code generation standards. The project metadata has also been updated to track the stable Flutter channel, and the main application entrypoint now correctly initializes the Rust library before running the UI.

_frb\_example/flutter\_via\integrate · high confidence

Updated macOS Xcode scheme for Flutter framework preparation

The macOS Runner Xcode scheme has been regenerated to include a pre-action shell script that runs the \macos\_assemble.sh prepare\ command from the Flutter SDK. This ensures the Flutter framework is correctly prepared before the application builds, aligning the project configuration with the updated Flutter scaffolding and toolchain requirements.

_frb\_example/flutter\package/example/macos/Runner.xcodeproj/xcshareddata · high confidence

Updated macOS project scaffold for Flutter 3.44/3.47 toolchains

The macOS Xcode project file has been regenerated to align with the latest Flutter toolchain updates (3.44 and 3.47). This change refreshes the native build configuration, including the addition of the \FlutterGeneratedPluginSwiftPackage\ framework reference and updated build phases, ensuring the example app compiles correctly against the upgraded Flutter SDK.

_frb\_example/flutter\_via\create/macos/Runner.xcodeproj · medium confidence

Website documentation overhaul and codegen help refresh

The website has been restructured with a new Docusaurus configuration (babel.config.js, .gitignore) and a comprehensive set of new documentation guides covering concurrency (async/sync for Dart and Rust), a demo gallery, and detailed contributor internals (CST/DCO/SSE codecs, opaque types). Additionally, the CLI help documentation for codegen commands (generate, create, integrate, build-web) has been regenerated to reflect current options, including the new native-assets integration backend and flags like --no-dart-fix and --no-dart-format.

website · high confidence

Wire C code generation now concatenates cbindgen output with dummy bundling code

The C wire generator now produces its final output by appending generated dummy bundling methods to the standard cbindgen header content. This change introduces a dedicated text generator that combines these two sources in order, ensuring the resulting C header includes both the standard bindings and the necessary dummy implementations for the wire protocol.

_frb\codegen/src/library/codegen/generator/wire/c · high confidence

Wire code generation refactored to use MIR and generate C bindings

The wire code generator has been restructured to operate on the Middle Intermediate Representation (MIR) instead of the previous IR, introducing a new \GeneratorWireOutput\ structure that aggregates generated Rust, C, and Dart files. This change enables the generation of C bindings (via \cbindgen\) for I/O targets, ensuring that Dart code receives the necessary C file content and extern function definitions to properly interface with the native layer.

_frb\codegen/src/library/codegen/generator/wire · high confidence

Test coverage

Add HarmonyOS device smoke test entry point; Added .gitkeep files to test fixture directories; Added dummy test and empty entrypoint files; Added generated Dart API tests for the pure\_dart example; Added generated pseudo-manual tests for twin API variants; Added generated test coverage for pure Dart twin API variants; Added generic type test fixtures for codegen parser; Added iOS example test scaffold; Added iOS unit test scaffold for Runner; Added iOS unit test scaffold for the Flutter example app; Added integration test driver entry point; Added integration test for Rust library linkage; Added integration test for Rust plugin initialization and function calls; Added integration test scaffolding for the Rust UI counter example; Added integration tests for Rust library linkage; Added integration tests for Web Audio API bindings; Added integration tests for the gallery example app; Added macOS Runner test scaffold; Added minimal test suite and platform-specific entrypoints; Added parser test fixtures for multi-file and qualified name handling; Added test fixture for Dart function code generation with default arguments; Added test fixture for faulty Rust output configuration; Added test fixture for generic Dart initializer hook; Added test fixture for parsing struct and enum methods; Added test fixture for unused struct and enum parsing; Added test utility for triggering Dart VM garbage collection; Added tests for Rust logging regression and basic Dart bindings; Added tests for dev Docker metadata parsing and precommit autofix workflows; Added tests for the FRB development environment helper script; Added tests for the FRB release CI gate logic; Added tests for the PR diff categorization skill; Added tests for the changelog verification script; Added tests for web test harness and build hook caching; Added unit tests for the frb\_dart runtime and CLI; Added widget smoke test for the Flutter app; Expanded test coverage for the pure Dart PDE example; Generated API test coverage for pure\_dart\_pde; Updated golden fixtures for single and wildcard Rust input parsing.

Dependencies

Flutter Rust Bridge v2.14.0-beta.2 release scaffolds and dependency updates

This release introduces the v2.14.0-beta.2 version of the Flutter Rust Bridge, updating the core Rust crates (\frb\_codegen\, \frb\_macros\, \frb\_rust\) and the Dart package (\frb\_dart\). The code generator now scaffolds integration templates for Android, iOS, and macOS that utilize Cargokit for native builds, with updated Gradle and Podspec configurations. Additionally, the Dart SDK constraint for the generated plugins has been raised to \\>=3.3.0\, and the \ffigen\ dependency in the generated examples has been updated to version \^20.1.1\.

(dependencies) · high confidence

Update Gradle wrapper to version 9.3.1

The Android example project now uses Gradle 9.3.1 for building, as specified in the updated gradle-wrapper.properties file. This ensures the project relies on the newer Gradle distribution for consistent and potentially improved build performance.

_frb\_example/flutter\package/example/android/gradle · high confidence

Updated Android Gradle wrapper to version 9.3.1

The Android build system for the flutter\_via\_integrate example now uses Gradle 9.3.1 (via the wrapper configuration) instead of the previous version. This ensures the project builds with the latest Gradle distribution, which may include performance improvements and bug fixes.

_frb\_example/flutter\_via\_create/android/gradle, frb\_example/flutter\_via\integrate/android/gradle · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 57 → 43 (-13.6)

Lenses

  • Code Health 73 → 73 (+0.0)
  • Architecture 96 → 96 (-0.2)
  • Maturity 75 → 75 (-0.2)
  • Readiness 63 → 60 (-3.2)
  • Security 74 → 61 (-13.4)
  • Domain Modelling 100 → 100 (+0.0)
  • Accessibility 42 → 17 (-24.3)
  • Performance 78 → 78 (+0.0)

Resolved (8)

  • Ambiguous naming convention for synchronous access. RustAutoOpaqueBase provides both read and blocking_read which appear to return the same type (RwLockReadGuard). It is unclear if read is async-aware or if blocking_read is the only true synchronous path, or if they are aliases. This creates confusion about which method to use for synchronous access.
  • Base-context workflow trigger runs with an unscoped token
  • Redundant method names for identical operations on different opaque types. Both BaseArc and RustOpaqueBase expose into_inner to consume the wrapper and retrieve the inner value T. While the underlying types differ (Arc vs Opaque handle), the semantic intent is identical.
  • Repeated repair: frb_codegen/src/library/codegen/config/internal_config_parser/mod.rs (frb_codegen/src/library/codegen/config/internal_config_parser/mod.rs)
  • Repeated repair: frb_codegen/src/main.rs (frb_codegen/src/main.rs)
  • Same ambiguity as read/blocking_read. write and blocking_write return the same type, creating confusion about synchronous vs asynchronous behavior.
  • Split frb_codegen
  • Workflow holding a long-lived secret is unscoped

New (30)

  • Ambiguous naming convention for async vs sync access. RustAutoOpaqueBase exposes both read and blocking_read. In async contexts, read often implies a non-blocking or future-returning operation, but here it returns a synchronous RwLockReadGuard. This is confusing for users who might expect read to be the primary async-safe method. Similarly for write vs blocking_write.
  • Base-context workflow trigger runs with an unscoped token (.github/workflows/remove_labels.yml)
  • Duplicate method name with different semantics/ownership implications. BaseArc::into_inner consumes the Arc to return the value (standard Arc behavior), whereas RustOpaqueBase::into_inner likely consumes the opaque handle to return the inner value, but the naming suggests identical behavior across different resource management models (Arc vs Opaque).
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/lint.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/lint.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/lint.dart)
  • High secret: WD-SECRET-0005 (tools/frb_internal/lib/src/makefile_dart/lint.dart)
  • Leaked secret: hardcoded-credential (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • Leaked secret: hardcoded-credential (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • Leaked secret: hardcoded-credential (tools/frb_internal/lib/src/makefile_dart/generate.dart)
  • Leaked secret: hardcoded-credential (tools/frb_internal/lib/src/makefile_dart/test.dart)
  • …and 10 more

Changes since last survey

  • 13 commits — 9 feature/other, 4 fixes

By area

  • (repo) — 5 commits
  • frb_codegen/src — 2 commits
  • website/docs — 2 commits
  • frb_dart/lib — 1 commit
  • frb_example/flutter_package — 1 commit
  • frb_example/flutter_package_native_assets — 1 commit
  • frb_example/pure_dart — 1 commit

Notable commits

  • fix: Merge pull request #3479 from djx-y-z/fix-shutdown-callback-race
  • fix: Merge pull request #3488 from dbsxdbsx/fix/exception-flag-class-level
  • fix: Merge pull request #3493 from fzyzcjy/fix/main-ci-2026-10-18
  • fix: Shorten the comments of the shutdown race fix
  • change: Accept cargo-expand output when expansion still succeeds
  • change: Mark a type as exception if any usage is a Result error, regardless of visiting order
  • change: Merge pull request #3476 from manish-ach/skip-tool-install
  • change: Refresh flutter_package_native_assets example pubspec.lock for petitparser 7.1.0
  • change: Refresh vm_service to 15.4.0 in Flutter example lockfiles
  • change: Update tool-installation.md
  • change: ci: rerun checks
  • change: move tool installation options docs to misc-features
  • change: refactor(codegen): extract compute_ty_priority in DistinctTypeGatherer

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

fzyzcjy/flutter_rust_bridge was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5463b190636ca9edf705be0b168471875e675ebf — the exact code this score is about.
  • Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.6+preprod-d36780c2d857.