liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Allow leveldb to be binded to by FFI #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice if I could bind to leveldb using FFI 
(https://github.com/ffi/ffi). To allow FFI bindings, leveldb needs to expose a 
C API (extern "C" { ... }) and build a dynamically-linked shared-library 
(libleveldb.so).

Original issue reported on code.google.com by postmode...@gmail.com on 29 Jul 2011 at 11:25

GoogleCodeExporter commented 9 years ago
ditto; an exposed C interface would be nice. I've started working on one here. 
I didn't start out with the idea of writing it in a way it could be contributed 
here, but if i do that i'll try to update this with a patch. You can see what 
i'm doing at 
https://github.com/jehiah/simplehttp/blob/simpleleveldb/simpleleveldb/c_leveldb.
cc

Original comment by jehiah on 30 Jul 2011 at 4:32

GoogleCodeExporter commented 9 years ago
This would also be helpful for the JNI bindings I'm writing: 
https://github.com/electrum/leveldb-jni

Original comment by electrum on 1 Aug 2011 at 12:08

GoogleCodeExporter commented 9 years ago

Original comment by tfar...@chromium.org on 1 Aug 2011 at 12:12

GoogleCodeExporter commented 9 years ago
JNA and JFFI bindings would also require this.

Original comment by postmode...@gmail.com on 1 Aug 2011 at 12:12

GoogleCodeExporter commented 9 years ago
I also had wanted a C API and had started on one.

I've put the current form of it up at:

https://github.com/waywardmonkeys/leveldb/tree/c-api

And the commit that added what I had at:

https://github.com/waywardmonkeys/leveldb/commit/d910afd30f4a57ca3dfffc163a3ccc1
43eca6120

I've noted a number of issues and thoughts in the TODO file in that commit as 
well.

If this seems like a good approach or people have suggestions, I'd be happy to 
hear and work on it further.  If I need to sign any paperwork (like a CLA), I'm 
able to do that as well.

Original comment by bruce.mi...@gmail.com on 1 Aug 2011 at 8:40

GoogleCodeExporter commented 9 years ago

Original comment by san...@google.com on 8 Oct 2012 at 9:22