Happy !
CipT / TalkFFI
Project infos
| License | MIT |
| Tags | automatic ffi generation, nativeboost |
| Creation date | 2012-12-27 |
| Website |
Monticello registration
About TalkFFI
This project enables automatic FFI generation for Smalltalk. It uses libclang to parse unmodified C header files and generate FFI bindings to c libraries.
For now it supports the generation of NativeBoost FFI binding, but the infrastructure should be easily retargetable to enable generation of bindings to other libraries (even other languages maybe).
The libclang bindings themselves were also generated using TalkFFI (using minimal hand-written binding for bootstrapping).
See [NativeBoost binding for LLVM using TalkFFI] to get a taste.
To load the project evaluate:
Gofer it
smalltalkhubUser: 'CipT' project: 'TalkFFI';
package: 'ConfigurationOfTalkFFI';
load.
(Smalltalk at: #ConfigurationOfTalkFFI) loadDevelopment.
IMPORTANT: You will need to define the path to your 32bit [libclang] dynamic library (release 3.1) in:
LibClangMap class >> libraryNameOrHandle
For some usage scenarios look at:
CLForeign2NBGenerator libClang31Mapping .
CLForeign2NBGenerator llvmc31Mapping .
