andymatuschak / react-native-leveldown

Native bindings to LevelDB for React Native, exposed as leveldown-compatible interface
MIT License
22 stars 6 forks source link

Add Android bindings #4

Closed giacomoran closed 4 years ago

giacomoran commented 4 years ago

I've added a React Native Android module, all tests pass. The module relies on my own fork of leveldb-android.

The initial idea was to use android-leveldb by litl but I've found that it lacked some functionalities required by the abstract-leveldown interface. I've found another similar project: leveldb-android by hf. It was more complete but it still lacked support for the errorIfMissing configuration parameter. I forked the library and added the parameter (actually there was an umerged pull request sitting around in the original project with the required feature, I copied the code over to the fork).

Resolves #1

giacomoran commented 4 years ago

Before merging, we should probably update instructions in the README about how to use this library.

Here are the instructions:

The testapp project serves as reference for the instructions.

The first instruction is required since I've added the leveldb-android dependency as a git submodule. If it is a problem, I can push the dependency in some repository and include it from there.

andymatuschak commented 4 years ago

Hooray! I just ran the Android test suite, and everything looks great.

I'll merge this, then update the Readme, add the Android paths to package.json so it's included in NPM, then publish 1.0.

Thank you so much, @RAN3000!

andymatuschak commented 4 years ago

Done: d07acd1. We're now at 1.0! Thanks again—looking forward to getting Orbit up and running on Android…