Skip to content
Prev Previous commit
Next Next commit
address more comments
  • Loading branch information
dcharkes committed Jan 25, 2024
commit f745db4532624703690816d60e080b28f1384744
9 changes: 6 additions & 3 deletions pkgs/native_assets_builder/doc/protocol/v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ A reference to a file that is identified by an `assetId`. There may be multiple
same `assetId` with different characteristics such as `target` or `link_mode`.

Note that in v1 there are _only_ native code assets, no data assets.
Native code assets are dynamic libraries.
Native data assets will be blobs of data accessible as a byte list in Dart.

#### AssetId
An asset must have an `assetId`. Dart code that uses an asset, references the
Expand All @@ -33,8 +35,8 @@ Dart and Flutter SDKs to be specified below:


### `build.dart`
A package with native assets MUST define a `build.dart` file which accepts
a `--config` option as follows:
To bundle native assets with a package, that package must define a `build.dart`
script which accepts a `--config` option as follows:

```console
$ dart build.dart --config <build_config.yaml>
Expand All @@ -61,7 +63,8 @@ The `build.dart` file MUST:


### `build_config.yaml`
Configuration file passed to `build.dart` as the `--config` option.
The Dart and Flutter SDK invoke `build.dart` of all packages in the transitive
dependencies and pass a `build_config.yaml` as the `--config` option.

```yaml
# Build in dry-run mode.
Expand Down