pub repository
mirror.p-hatan.irnative_assets_cli
0.5.2A library that contains the argument and file formats for implementing a native assets CLI.
This package is discontinued upstream.
Readme
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 usesdart:ffiandpackage:ffigento call into native code.src/contains C/C++/Rust code which is invoked throughdart:ffi.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/.
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.
Changelog
0.5.2
- Fix test.
0.5.1
- Update documentation about providing
NativeCodeAsset.filein dry runs. https://github.com/dart-lang/native/issues/1049
0.5.0
- Breaking change Completely rewritten API. https://github.com/dart-lang/native/pull/946
- Breaking change Move
build.darttohook/build.dart. https://github.com/dart-lang/native/issues/823 - Breaking change Use JSON instead of YAML in the protocol. https://github.com/dart-lang/native/issues/991
- Bump examples dependencies to path dependencies.
0.4.2
- Fix dartdoc generation. Hide the implementation details.
0.4.1
- Breaking change Removed all code not used in
build.dartscripts out of the public API.
0.4.0
- Added example/use_dart_api/ detailing how to use
dart_api_dl.hfrom the Dart SDK in native code. - Breaking change Moved code not used in
build.darttopackage:native_assets_builder.
0.3.2
- Fixed an issue where
Depenendencies.dependenciescould not be modified when expected to.
0.3.1
- Added
Target.androidRiscv64.
0.3.0
- Breaking change Add required
BuildConfig.packageName(#142).
0.2.0
- Breaking change Rename
Asset.nametoAsset.id(#100). - Added topics.
- Fixed metadata example.
- Throws
FormatExceptions instead ofTypeErrors when failing to parse Yaml (#109).
0.1.0
- Initial version.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add native_assets_clipubspec.yaml
name: native_assets_cli
description: >-
A library that contains the argument and file formats for implementing a
native assets CLI.
# Note: Bump BuildConfig.version and BuildOutput.version on breaking changes!
version: 0.5.2
repository: https://github.com/dart-lang/native/tree/main/pkgs/native_assets_cli
topics:
- ffi
- interop
- native-assets
environment:
sdk: '>=3.3.0 <4.0.0'
dependencies:
cli_config: ^0.2.0
collection: ^1.17.1
crypto: ^3.0.3
logging: ^1.2.0
pub_semver: ^2.1.3
yaml: ^3.1.1
dev_dependencies:
dart_flutter_team_lints: ^2.1.1
file_testing: ^3.0.0
test: ^1.21.0
yaml_edit: ^2.1.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | 2023-07-11T08:33:17.913341Z | Download | e41cfa1116f8fc6ed958e85210964e98fbf6567ff87ff16299f8999a10f3868b |
| 0.2.0 | 2023-08-07T13:41:45.609070Z | Download | 51d1af3ebc2437f5883ed749f1877cb82d6a569b0712dad02c8370e6e4f2b5e3 |
| 0.3.0 | 2023-10-03T12:10:05.263805Z | Download | bc46eb278008f2b5a736e5ebba88536107a698c685df03dcc92ed9a8a4606c1c |
| 0.3.1 | 2023-10-27T09:18:31.896473Z | Download | 773fec4c7ba49a6dfd24176f58c1b3ee644b1ecac162855ec25a9d4fbb25c9b0 |
| 0.3.2 | 2023-10-27T19:54:56.891865Z | Download | 3119600043214157fb54f4ef05717a82a7858f35625fe767799c60f3039361c8 |
| 0.4.0 | 2024-01-11T19:15:33.615565Z | Download | 96ad94629485cd3a834ff086ea462ecce2822af3815667b39ca2d26accd02dcd |
| 0.4.1 | 2024-01-15T10:27:55.518982Z | Download | 956a600ea41b0579ae90bd47ae4ce65a77f73935b11f4945c41d04a3edfb9fb9 |
| 0.4.2 | 2024-01-22T16:18:55.618781Z | Download | 4eb8a94601af0acd50f7e75e1ad15c0db0b046b89256ee994776b6a6d49139b7 |
| 0.5.0 | 2024-03-22T10:27:20.292859Z | Download | b53b7b057b107a0907a7238280e49cf16328eaefa56effd56eecfdf42353c375 |
| 0.5.1 | 2024-03-22T15:33:58.464844Z | Download | d9b1f2655703a24cca1fbc18be8d64a3638c3273a80b7db6fecc3dd9f433f660 |
| 0.5.2 | 2024-03-22T16:57:51.755564Z | Download | 1a5c26b452433eb6764964f7110ee67564d1f3ce9bd6fe5ac450fb6af7842dc5 |
| 0.5.3 | 2024-03-25T12:40:42.015519Z | Download | aa257d7c8d2e4bee8339a077d0ddef97f01b28fadb7a379074142782928ab1c3 |
| 0.5.4 | 2024-03-26T11:13:52.940514Z | Download | 9c1b67ccf85ec9282f34e5348ae78dcb7da2c7dc965c0265306477d977853a0d |
| 0.6.0 | 2024-05-16T13:07:57.163945Z | Download | f54ddc4a3f8cff1d8d63723b4938902da7586a5a47fe3c1bfa226eb80223f32e |
| 0.6.1 | 2024-07-05T06:14:54.485160Z | Download | dd11b0b4c7b7477e10c3e40cd9ed4006aec19069cee4cd5f15d81e8076d49ae4 |
| 0.7.0 | 2024-07-10T09:50:25.680432Z | Download | 6d6a20513787c3670fc1ed4e00b380dce01282a118cf7b88080dcfef76642e5e |
| 0.7.1 | 2024-07-12T14:35:49.878258Z | Download | b94fd14839315dca7a0db87ba05759949746ca61583aa1a58b11cc532bce2c8d |
| 0.7.2 | 2024-07-15T13:04:37.778399Z | Download | 3da9bdd4beb2ed059dae7fd93baa62c5f6c3cdf630bbb88334303dfa92d6da26 |
| 0.7.3 | 2024-09-02T09:34:28.661292Z | Download | 1ff032c0ca050391c4c5107485f1a26e0e95cee18d1fdb2b7bdbb990efd3c188 |
| 0.8.0 | 2024-09-13T11:50:12.574949Z | Download | db902509468ec2a6c6d11fa9ce02805ede280e8dbfb5f0014ef3de8483cadfce |
| 0.9.0 | 2024-11-04T14:53:25.643156Z | Download | 9573f442a27000af0597639bf8a3db24f23cf6cbab7469ce3b9c80f585075e6b |
| 0.10.0 | 2024-12-20T13:02:43.341321Z | Download | 46b41ae12be818eb15515d1ff83fec0d5516e7e6afdc13e2738bf8da43d6dd52 |
| 0.11.0 | 2025-01-22T16:23:29.881117Z | Download | 537e258b4ee782d81344414c722822014c9e5429f2f98a84a0c2e796f71f4798 |
| 0.12.0 | 2025-03-20T14:28:03.944086Z | Download | bd4cac2c174be1ec0dd86c1bd2b55ffaad6870f7bcf31b2d5d85d0a5fbc40e82 |
| 0.13.0 | 2025-03-31T09:26:04.541418Z | Download | 0907c5b85a21ae08dcdd0d2b75061cc614939911c2cab5ac903f35a9fbb2a50b |
| 0.14.0 | 2025-04-08T18:03:53.059232Z | Download | 298ba641e47b44f039601141ab26f6865186b5d05b7f313d45797513d7205b3d |
| 0.15.0-0 | 2025-04-11T07:32:28.344733Z | Download | 06befcd32bc1a17166df5680aaeb4286d3e0b740871134a49060dd9866f1aea2 |
| 0.15.0 | 2025-04-15T14:14:28.794035Z | Download | 9e3bf0a7ef9e609836f1de93874e0570bc92b57464181fe9db2a08347873f220 |
| 0.16.0 | 2025-04-16T16:01:51.600309Z | Download | b5e4ff8d346c81e757403e17dec1d3c58adc561556ac8433d0becff69757b5cb |
| 0.17.0 | 2025-04-23T16:02:51.847214Z | Download | dad5e15960ccf485da40aa010c47cab06e9a32fb6dbc336c1a89af325073f6fe |
| 0.18.0 | 2025-04-29T09:56:05.792420Z | Download | 224d3d7eb3fd05ed631a2a19986a2189c009ccda7747f5192096998200d45bfe |
Dependencies
cli_config "^0.2.0"
collection "^1.17.1"
crypto "^3.0.3"
logging "^1.2.0"
pub_semver "^2.1.3"
yaml "^3.1.1"