Dub package with C code

Sebastiaan Koppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 23 19:43:19 PDT 2015


I have just created bindings for libxlsxwriter, an c library for 
creating excel files.

Used the htod tool to do most of the work, and only had to adjust 
some things - mainly because libxlsxwriter uses data structures 
written in macro's.

Right now I am making a dub package and I would like to aim for 
convenience for end-users (read: me).

Therefor I decided to include the compiled static library inside 
the package. I only use Linux 64-bit myself, but this is 
obviously limiting for other people.

The other option I had was to include the whole c code, depend on 
gcc or clang, and have dub  (somehow) first build libxlsxwriter. 
But that seemed a bit too much...

Another option would be to require end-users to build 
libxlsxwriter themselves.

What do you guys recommend?


More information about the Digitalmars-d-learn mailing list