Closed dcharkes closed 2 weeks ago
This is a conceptually appealing idea, but I see some issues.
NativeLibrary
in the low-level file.Relatedly, maybe it would help usability if we generate some comments at the top of the file that lists all the functions/classes/methods, so the user doesn't have to scroll through a huge generated file? Or do we assume users are just going to run dartdoc or something?
package:objective_c now owns all the low level bindings, so this is done.
https://github.com/dart-lang/ffigen/pull/333#discussion_r855843903
I wonder if it would make sense to make ffigen for objective C generate two files instead of one:
Pointer
s a lot.dart:ffi
types (exceptPointer<NativeFunction<...>>
for callbacks).The benefits would be that we:
However, maybe this doesn't work because an ObjectiveC programmer uses the object-oriented and low level things intermixed.
@brianquinlan since you are the main user right now, what are your thoughts on this?
@liamappelbe WDYT? (And would it make sense to have two layers in the implementation as well?)