native
native copied to clipboard
[ffigen] Generate `ResourceIdentifier`s for Objective-C
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?