native_assets_cli 0.9.0 copy "native_assets_cli: ^0.9.0" to clipboard
native_assets_cli: ^0.9.0 copied to clipboard

A library that contains the argument and file formats for implementing a native assets CLI.

package:native_assets_cli Coverage Status pub package package publisher

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.

Example #

A typical layout of a package with native code is:

  • lib/ contains Dart code which uses dart:ffi and package:ffigen to call into native code.
  • src/ contains C/C++/Rust code which is invoked through dart:ffi.
  • hook/build.dart implements the CLI that communicates which native assets to build/bundle with the Dart/Flutter SDK. This file uses the protocol specified in this package.

Example can be found in example/build/.

Usage #

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.

Development #

The development of the feature can be tracked in dart-lang#50565, flutter#129757, and in the issue tracker on this repository.

19
likes
150
pub points
100%
popularity

Publisher

verified publisherlabs.dart.dev

A library that contains the argument and file formats for implementing a native assets CLI.

Repository (GitHub)
View/report issues

Topics

#ffi #interop #native-assets

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection, crypto, logging, meta, pub_semver, test, yaml

More

Packages that depend on native_assets_cli