[native_assets_cli] Access to dart_api.h and dart_api_dl.h + passing in the api version
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
When compiling native code from source, it would be nice if we'd compile against `dart_api.h` or `dart_api_dl.h` from the Dart/Flutter SDK that is invoking `build.dart`. This would prevent version skew between the native API and the Dart VM.
It would not prevent version skew with precompiled binaries, as they already have been compiled.
To prevent version skew with precompiled binaries we'd need to pass `dart_api_version.h`'s version as an argument as well, so that the users can precompile a version per Dart API. This would be analogous to what python is doing. (@brianquinlan You pointed to examples of this earlier, but I can't seem to find where you did that.) Note that at this point you'd need an older Dart SDK to precompile a dylib to an older API version.
Contributor guide
Assessment
This issue has not been assessed yet.