dart-lang / dart-lang/native

[ffigen] Generate `ResourceIdentifier`s for Objective-C

Open
#1,099 2 comments 0 reactions 0 assignees View on GitHub
lang-objective_c package:ffigen
Dominant language
Dart
Stars
275
Forks
144
Avg merge
2d 10h
Merged PRs (30d)
47

Description

For tree-shaking we want to generate `ResourceIdentifier` annotations.

For C:

* https://github.com/dart-lang/native/issues/1085

For JNIgen:

* https://github.com/dart-lang/native/issues/1098

Probably for Objective-C (and Swift?) we could or should do something similar. The idea for C code is to compile to a static lib with all symbols in `build.dart` and then call the native linker in `link.dart` and pass the exact list of C symbols to keep based on what `@Native`s (annotated with `@ResourceIdentifier`) are reachable after TFA. Would a similar approach work for Objective-C @liamappelbe?

I presume that for the actual classes in Objective-C we might need something more similar to JNIgen, where we generate `@ResourceIdentifier`s for the classes and instance methods.

Same questions to answer here:

* What do we need from the resource.json format?

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.