dart-native / codegen

Generator for dart_native bindings. Codegen can transform native SDK to Flutter plugin.
BSD 3-Clause "New" or "Revised" License
79 stars 3 forks source link

Generate C Function #27

Open yulingtianxia opened 4 years ago

yulingtianxia commented 4 years ago

有一些 API 是 C 函数,理论上可以自动生成 Dart 接口。 需要注意的是,需要 Native Header 文件暴露接口,可以参考 dart_native 中 _dispatch_get_main_queue 的实现,生成一层封装并通过 DN_EXTERN 暴露。或者想个更牛逼的解决方案,嗯。