[prebuilt_code_assets] Distinguish disabled record use from no used functions The docs and messages said "no recorded uses" for two different cases: - Record use is disabled (`input.recordedUses` is `null`): it is unknown which functions the application uses. They now say "record use is disabled". - The application uses none of the functions: `link` now explicitly bundles no library and returns before setting up the linker, instead of relying on `CLinker` skipping an empty `symbolsToKeep`. This also holds with `treeshake: on`. Adds unit tests for the second case on Linux and Windows in the `auto` and `on` modes, and an integration test that a `dart build cli` app that calls none of the functions runs without the library.
This repository is home to Dart packages related to FFI and native assets building and bundling.
See the doc directory for more documentation.
| Package | Description | Issues | Version |
|---|---|---|---|
| code_assets | This package contains the Dart API for code assets in hook/build.dart and hook/link.dart. | ||
| data_assets | This package contains the Dart API for data assets in hook/build.dart and hook/link.dart. | ||
| ffi | Utilities for working with Foreign Function Interface (FFI) code. | ||
| ffigen | Generator for FFI bindings, using LibClang to parse C, Objective-C, and Swift files. | ||
| hooks | This package contains the API for hook/build.dart and hook/link.dart. | ||
| hooks_runner | This package is the backend that invokes hook/build.dart and hook/link.dart from Dart and Flutter. | ||
| jni | A library to access JNI from Dart and Flutter that acts as a support library for package:jnigen. | ||
| jni_flutter | A library to access Flutter Android specific APIs from Dart. | ||
| jni_util | A library to access Flutter Android specific APIs from Dart. | ||
| jnigen | A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine. | ||
| native_toolchain_c | A library to invoke the native C compiler installed on the host machine. | ||
| objective_c | A library to access Objective C from Flutter that acts as a support library for package:ffigen. | ||
| prebuilt_code_assets | Build and link hook helpers for packages that ship prebuilt native libraries, with a fallback to building from source and tree-shaking in link hooks. | ||
| record_use | Dart API to access @RecordUse() recorded usages in link hooks. | ||
| swift2objc | A tool for generating bindings that allow interop between Dart and Swift code. | ||
| swiftgen | A tool for generating bindings that allow interop between Dart and Swift code. |
Packages not on this repo but also related to FFI and native assets. ❤️
| Package | Description | Version |
|---|---|---|
| native_toolchain_cmake | A library to invoke CMake for Dart Native Assets. | |
| native_toolchain_go | A library to invoke the native Go compiler installed on the host machine. | |
| native_toolchain_ninja | A library to invoke Ninja for Dart Native Assets. | |
| native_toolchain_rust | A library to build and bundle Rust code for Dart Native Assets. | |
| native_toolchain_zig | A library to build and bundle Zig code for Dart Native Assets. |
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
For additional information about contributing, see our contributing page.