LeanStore is a larger-than-memory database, optimized for NVMe SSD and multi-core CPU, achieves performance close to in-memory systems without having to keep all data in memory.
vcpkg is used to manage third-party libraries, please install it before building the project. It's highly recommended to develop the project inside a docker container, which can be built from this Dockerfile:
cmake --preset debug_coro
cmake --build build/debug_coro -j `nproc`
ctest --test-dir build/debug_coro -j 4LeanStore is built as a static library by default and requires C++23. The library provides full CMake package support via find_package(leanstore).
-
Build and install LeanStore:
cmake --preset release_coro cmake --build build/release_coro -j $(nproc) cmake --install build/release_coro --prefix ./dist -
In your CMake project:
cmake_minimum_required(VERSION 3.25) project(my_project CXX) set(CMAKE_CXX_STANDARD 23) list(APPEND CMAKE_PREFIX_PATH "/path/to/leanstore/dist") find_package(leanstore CONFIG REQUIRED) add_executable(my_target main.cpp) target_link_libraries(my_target PRIVATE leanstore::leanstore)
-
Configure with vcpkg (if using the same environment):
cmake -B build -DCMAKE_PREFIX_PATH="/path/to/leanstore/dist;/path/to/vcpkg/installed/x64-linux"
- FetchContent: For direct source integration without installation (see examples).
- pkg-config: Legacy support for non-CMake projects.
| Preset | Description |
|---|---|
debug_coro |
Debug build with coroutine support |
release_coro |
Release build with coroutine support |
debug_tsan |
Debug build with thread sanitizer |
release_thread |
Release build without coroutines |
All presets build static libraries by default. Set BUILD_SHARED_LIBS=ON for shared libraries.
Complete C and C++ examples are available in examples/c and examples/cpp. For detailed dependency management and advanced usage, see docs/cmake_integration_guide.md.
Contributions are welcomed and greatly appreciated! See docs/development.md for comprehensive development guidelines, environment setup, and contribution workflow.
You can also join the slack workspace to discuss any questions or ideas.
LeanStore is under the MIT License.
Thanks for the LeanStore authors and the leanstore/leanstore project.
