dart-lang / dart-lang/native

[native_assets_cli] Access to dart_api.h and dart_api_dl.h + passing in the api version

Open
#839 8 comments 0 reactions 0 assignees View on GitHub
P2 package:hooks
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.