CrabDB is a lightweight, portable key-value database designed to offer fast and efficient data storage in a user-friendly format. Available in two distinct interfaces—MyShell and NoShell—CrabDB tailors its experience to fit various use cases, from those who prefer a SQL-like syntax to those who prefer raw, key-based access. Its book-inspired structure, where each entry is akin to a page in a book, makes managing key-value pairs intuitive and easy to understand, while ensuring high performance across both small and large datasets.
Feature | MyShell | NoShell |
---|---|---|
Portability & Cross-Platform | Works across different operating systems, offering seamless performance with minimal dependencies. | Works across various platforms without external dependencies, ensuring smooth performance. |
Interface | SQL-like command interface, ideal for users familiar with relational databases. | Direct key-value CRUD operations with a minimalistic approach, no query language required. |
CRUD Operations | Insert, find, update, and delete key-value pairs with SQL-like commands. | Perform CRUD operations using direct key-value access. |
Backup and Restore | Supports backup and restore features using MyShell's command-line interface. | Allows for easy backup and restore of database files with no query overhead. |
API | Intuitive API designed for SQL-like interaction. | Simple API for minimalistic key-value operations. |
Memory Management | Optimized for low memory usage and fast access, even with large datasets. | Ensures efficient memory usage and performance, even with direct key-value access. |
Database Management | Full support for creating, opening, closing, and deleting databases, as well as managing backups. | Supports similar database management operations with a direct approach, including backups and restores. |
To get started with Fossil CrabDB, ensure you have the following installed:
- Meson Build System: If you don’t have Meson installed, follow the installation instructions on the official Meson website.
- CMake Build System: If you don’t have CMake installed, follow the installation instructions on the official CMake website.
-
Install Meson Build System: Install Meson version
1.3
or newer:python -m pip install meson # To install Meson python -m pip install --upgrade meson # To upgrade Meson
-
Create a
.wrap
File: Add thefossil-crabdb.wrap
file in yoursubprojects
directory and include the following content:# ====================== # Git Wrap package definition # ====================== [wrap-git] url = https://github.com/fossillogic/fossil-crabdb.git revision = v0.2.2 [provide] fossil-crabdb = fossil_crabdb_dep
-
Integrate the Dependency: In your
meson.build
file, integrate Fossil CrabDB by adding the following line:dep = dependency('fossil-crabdb')
To use Fossil CrabDB with CMake, follow these steps:
-
Install CMake: Install CMake version
3.13.4
or newer:python -m pip install cmake # To install CMake python -m pip install --upgrade cmake # To upgrade CMake
-
Find and Integrate Fossil CrabDB: After installing CMake, you can integrate Fossil CrabDB as a dependency. Add the following lines to your
CMakeLists.txt
file:# Find Fossil CrabDB package find_package(FossilCrabDB REQUIRED) # Link the Fossil CrabDB to your project target_link_libraries(your_target FossilCrabDB)
-
Configure Your CMake Project: Make sure to configure your CMake project to include the necessary paths and dependencies for Fossil CrabDB. Typically, you’ll want to make sure the
FossilCrabDB
library is correctly linked in your build configuration.This will ensure that Fossil CrabDB is included and properly built with your project.
You have options when configuring the build, each serving a different purpose:
- Running Tests: To enable running tests, use
-Dwith_test=enabled
when configuring the build.
Example:
meson setup builddir -Dwith_test=enabled
If you're interested in contributing to this project, encounter any issues, have questions, or would like to provide feedback, don't hesitate to open an issue or visit the Fossil Logic Docs for more information.