Persistent key-value-store for D?
bachmeier via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Apr 26 12:07:22 PDT 2017
On Wednesday, 26 April 2017 at 17:06:52 UTC, krylon wrote:
> If I understand what I have read so far correctly, it is
> possible to access libraries written in C or C++ from D - in
> that case, I could just use Tokyocabinet directly, but I have
> not found any pointers on how to do this. Is this a feasible
> option, and if so, where can I find documentation on how to do
> this?
Welcome to the D community.
I've never heard of Tokyocabinet, but I did a search and the
header files look like they'd be a straightforward translation to
D, for instance
http://bazaar.launchpad.net/~tokyocabinet/tokyocabinet/c99-posix-trunk/view/head:/tcutil.h
You can call C libraries directly. I'd suggest trying dstep on
the header files as a first step.
https://github.com/jacob-carlborg/dstep
These resources might help:
https://wiki.dlang.org/Bind_D_to_C
http://dlang.org/spec/interfaceToC.html
You only need to write a binding for functions that you actually
want to call, which might explain why nobody has made bindings
available.
More information about the Digitalmars-d-learn
mailing list