native_assets_cli 0.4.2 native_assets_cli: ^0.4.2 copied to clipboard
A library that contains the argument and file formats for implementing a native assets CLI.
This library contains the CLI specification and a default implementation for bundling native code with Dart packages.
Status: Experimental #
NOTE: This package is currently experimental and published under the labs.dart.dev pub publisher in order to solicit feedback.
For packages in the labs.dart.dev publisher we generally plan to either graduate the package into a supported publisher (dart.dev, tools.dart.dev) after a period of feedback and iteration, or discontinue the package. These packages have a much higher expected rate of API and breaking changes.
Your feedback is valuable and will help us evolve this package. For bugs, please file an issue in the bug tracker. For general feedback and suggestions for the native assets feature in Dart and Flutter, please comment in dart-lang#50565 or flutter#129757.
A typical layout of a package with native code is:
lib/contains Dart code which uses
package:ffigento call into native code.
src/contains C/C++/Rust code which is invoked through
build.dartimplements the CLI that communicates which native assets to build/bundle with the Dart/Flutter SDK. This file uses the protocol specified in this package.
An example can be found in example/.
Using the native assets feature requires passing
--enable-experiment=native-assets in Dart on a dev build.
The native assets feature is not yet available in Flutter.