Bindings for C library tokyocabinet

107 views
Skip to first unread message

Sven Hartrumpf

unread,
Aug 11, 2017, 4:44:38 PM8/11/17
to chez-scheme
Hi.

I would like to write some C-bindings (using FFI for Chez) to tokyocabinet, which is an efficient key-value store (see http://fallabs.com/tokyocabinet/).
I don't need all functions from tokyocabinet; a coverage like implemented in a Chicken egg http://wiki.call-cc.org/eggref/4/tokyocabinet
would be fine.

Before I start:
1. Are there any (partial) bindings for tokyocabinet around?
2. If not: are there any examples for other key-value stores (dbm, ndbm, gdbm, qdbm)?

Greetings
Sven

Aldo Nicolas Bruno

unread,
Aug 17, 2017, 7:24:21 AM8/17/17
to Sven Hartrumpf, chez-...@googlegroups.com

On 11/08/2017 22:44, Sven Hartrumpf wrote:
> Hi.
>
> Before I start:
> 1. Are there any (partial) bindings for tokyocabinet around?
> 2. If not: are there any examples for other key-value stores (dbm,
> ndbm, gdbm, qdbm)?

Hi,
I did some stuff last year with lmdb...

https://pizzahack.eu/fossil/thunderchez/doc/tip/lmdb.sls
https://pizzahack.eu/fossil/thunderchez/dir?ci=trunk&name=lmdb

I've used c2ffi for extracting the bindings from the c headers

https://github.com/rpav/c2ffi

also take a look to this example I've translated from the official sources

https://pizzahack.eu/fossil/thunderchez/doc/tip/lmdb/mtest.ss

https://github.com/LMDB/lmdb/blob/mdb.master/libraries/liblmdb/mtest.c

actually this code is not well tested so take it as it is with no
warranty ;)

this instead is used in production:

https://pizzahack.eu/fossil/thunderchez/doc/tip/sqlite3.sls

Best regards ;)

Aldo
Reply all
Reply to author
Forward
0 new messages