Abstract Apple platforms in ffigen config
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
Currently to write Dart code that will run on both iOS and macOS and uses a system SDK that supports both, I have to pick one of the two platforms arbitrarily to list header entry points for, as the paths are platform-specific. E.g.: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFoundation.framework/Versions/A/Headers/AVFoundation.h
It would be nice to be able to put a placeholder in place of the whole platform-specific sub-path, and then list the platforms in the config via something like:
```yaml
headers:
platforms:
- ios
- macos
entry-points:
...
```
and have ffigen create the necessary paths for both and then merge the output of using both.
(See also https://github.com/dart-lang/native/issues/471 and https://github.com/dart-lang/native/issues/1469 for related issues.)
Contributor guide
Assessment
This issue has not been assessed yet.