leveldb_dart 1.0.1
leveldb_dart: ^1.0.1 copied to clipboard
LevelDB for Dart using dart:ffi
An implementation of LevelDB for Dart using dart:ffi. Based on flutter_leveldb by LiuJQ.
How to build the LevelDB shared library #
-
Step 1: Clone the LevelDB repository with submodules:
git clone --recurse-submodules https://github.com/google/leveldb.git
-
Step 2: Build the LevelDB shared library:
cd leveldb mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=on -DLEVELDB_BUILD_TESTS=off -DLEVELDB_BUILD_BENCHMARKS=off . cmake --build ..
This will output the path of the shared library, which is typically named
libleveldb.so
on Linux,libleveldb.dylib
on macOS, orleveldb.dll
on Windows. -
Step 3: Copy the shared library to the Dart project.
cp <path_to_your_shared_library> <path_to_your_dart_project>