dart-lang / native

Dart packages related to FFI and native assets bundling.
BSD 3-Clause "New" or "Revised" License
115 stars 39 forks source link

Provide template similar to plugin_ffi #776

Open mahesh-hegde opened 2 years ago

mahesh-hegde commented 2 years ago

The pdfbox_plugin example I added dart-lang/jnigen#36 was created by running flutter create --template=plugin_ffi ... and then removing many C related files from it.

It's better to provide a starter template.. We need ffiPlugin: clauses in pubspec and all build infrastructure of FFI plugin but without ffigen specifics - Eg: ffigen.yaml can be replaced by jnigen.yaml.

cc @dcharkes

dcharkes commented 2 years ago

That would indeed be nice. 👍 We'd want to do this when we would like to move this project out of the experimental phase.

mahesh-hegde commented 1 year ago

I am trying to create a prototype of this, (jnigen:create)

Which templates should be there?

Since we have encountered complexities (mostly related to pub) with hybrid ffi plugins, should there be separate versions of these templates? eg: flutterFfiPlugin and standaloneFfiPlugin?

dcharkes commented 1 year ago

cc @HosseinYousefi

mahesh-hegde commented 1 year ago

I'm shelving this for now. Because this needs to be tested end-to-end, and our test suite is not very fast right now. After dart-lang/native#742 and dart-lang/native#695 should be a good time to add more complete tests.