[ffigen] Ease using function pointers and function tables
Open
package:ffigen
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
Some projects have function tables exposed in header files. Using such function pointers requires the user to write an `asFunction` with the correct Dart signature. (I believe the main use case in C code is dynamic dispatch.)
We should explore if we can generate the Dart code that does the `asFunction`.
Some use cases:
* https://github.com/dart-lang/sdk/issues/54467#issuecomment-1875266313
* win32 COM apis (even though package:win32 has it's own code generator and is not using FFIgen)
* (I've seen more instances, but I can't remember where.)
Contributor guide
Assessment
This issue has not been assessed yet.