commit | 0901a3323022fdb59657cc2cb00ea5c80a8468a6 | [log] [tgz] |
---|---|---|
author | Daco Harkes <dc.harkes@gmail.com> | Wed Feb 14 14:03:23 2024 +0100 |
committer | GitHub <noreply@github.com> | Wed Feb 14 13:03:23 2024 +0000 |
tree | 8a3c99ef98108d153d9fd1fc1e124427d6cc876f | |
parent | b1a0c2a211c2c85d9392b74abacef5eca7a62364 [diff] |
[native_assets_builder] Separate `KernelAsset`s from `Asset`s (#964) There are multiple differences between the `native_assets.yaml` that is embedded in the kernel file and the `build_output.yaml -> assets`. * Based on the discussions on https://github.com/dart-lang/native/pull/955 and https://github.com/dart-lang/native/pull/946, it is clear that the `path` for assets should be in `Asset`, not in `AssetPath` for the file-path the asset has after the `build.dart` run. When the embedders (Flutter/Dart) embed the native assets mapping then the `path`s start representing the path on the system where the Dart/Flutter app is running. This should be embedded in the path-type there. * The kernel info does not contain link mode (currently), as static linking is not supported. It's not clear that if we support static linking whether any information should be embedded in the kernel info at all. * The native_assets.yaml for the kernel file is laid out for easy lookup at runtime (keyed on Target). * We want to change the `Asset`s to output OS and Architecture instead of Target. Therefore we should not share the data structure between `Asset`s and `KernelAsset`s (new name for the entries that are embedded via native_assets.yaml in a kernel file.) This means that `dartdev` and `flutter_tools` will have to start converting `Asset`s to `KernelAsset`s when making the `native_assets.yaml` file. Therefore this is a breaking change and will have to be rolled into Dart and flutter/flutter manually.
This repository is home to Dart packages related to FFI and native assets building and bundling.
Package | Description | Version |
---|---|---|
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. | |
jni | A library to access JNI from Dart and Flutter that acts as a support library for package:jnigen . | |
jnigen | A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine. | |
native_assets_builder | This package is the backend that invokes top-level build.dart scripts. | |
native_assets_cli | A library that contains the argument and file formats for implementing a native assets CLI. | |
native_toolchain_c | A library to invoke the native C compiler installed on the host machine. |
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.