-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only generate non-included structs as Opaque if only referenced by pointer #395
Comments
It's not always practical to include structs manually in config (since there could be a lot of them). So I think we should probably keep this behind a flag (Something like |
So far, in using BoringSSL it's been only a dozen.
Agreed. I'm not entirely sure about what the default should be. When generating
structs:
include:
- MyStruct
dependencies: full | opaque The structs that are pulled into the generated code because they are dependencies are either generated fully or opaque. wdyt? |
This seems cool too. But I think the default should be |
That's fair. I was approaching it the other way around, I'd like to generate as small a set of bindings for my use case as possible. |
On second thought, I think we should have a top level key called |
https://github.com/dart-lang/ffigen/blob/89084d968ce0d587b19290366762ab7af7ffbe61/README.md#L474-L477
If
struct
s are only referenced byPointer<struct>
we should generate them asOpaque
if they are not included.For example here.
If someone wants the full struct, they can include it.
The text was updated successfully, but these errors were encountered: