On Sunday, 2 September 2018 at 12:52:11 UTC, Russel Winder wrote:
I am rewriting a C++ program in D, but need to access a C
library that has no D binding: this is a GtkD based program
which has a Pango binding, but Pango doesn't offer the
information I need, that is hidden in the underlying Fontconfig
C API.
I could create a complete D binding for Fontconfig using the
GIR files but that seems a bit over the top.
Can anyone point me at an example of a D program using a C API
that has structs, enums and functions so I can see if I just
hack enough for my use or go on to the full binding activity.
You can look at zmqd[1] as an example. I've been using it in
production. I've also used dstep[2] to translate C headers to D.
[1] https://github.com/kyllingstad/zmqd
[2] https://github.com/jacob-carlborg/dstep