Example of using C API from D?

Russel Winder russel at winder.org.uk
Sun Sep 2 17:11:44 UTC 2018


On Sun, 2018-09-02 at 15:40 +0000, Arun Chandrasekaran via Digitalmars-
d-learn wrote:
> […]
> 
> 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

zmqd itself is just a thin D wrapper around deimos.zmq which is where
the C stuff is. Looks like a lot of repetition, and it is manual – but
very useful for the task of the moment, so thanks for the pointer. For
0MQ, using DStep might be better than the hand crafted zmqd/diemos.zmq.
I am not sure if DStep is the right tool for creating a complete D
binding to Fontconfig. Given that Fontconfig has a GIR file, using
girtod may well be the better route. 

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20180902/000a565c/attachment.sig>


More information about the Digitalmars-d-learn mailing list