fficxx
fficxx copied to clipboard
Haskell-C++ Foreign Function Interface Generator
at least we need to support GHC 8.2, 8.4, 8.6, 8.8.
For signaling finalization from Haskell GC, ForeignPtr is necessary. Originally, fficxx used ForeignPtr but for simplicity, we dropped the support. It's good to have optional support for Ptr/ForeignPtr.
By default, fficxx generate FFI code as safe FFI. However, for performance, it is desirable to allow users to specify `unsafe` for a certain methods. Make this opt-in.
funcitons with default parameters like `int foo( char a, int b=0, bool=true )` had better be handled automatically. Currently, it is just manually handled with alias. Suggestion is `foo_`, `foo__`...
fficxx types are full of partial records. We should get rid of them.
It's time to move towards modern GHC API.
Currently, binding library developer should embed C++ interface as a Haskell data and write a Haskell script to generate code. The data structure for C++ interface is pretty simple, so...
The instructions in the README for running the example suggest that this command: ``` ghc MySampleGen.hs ``` can successfully build MySampleGen.hs, but this is false since MySampleGen.hs has import statements....
POD C struct had better be treated as Storable for a better interoperability with Haskel (like c2hs)