A simple in-memory key value database built with Rust 🦀
This project is a workspace built by two systems and a library.
The library is Ghost DB itself, responsible for managing data on disk. Both systems are responsible for using the library; the Shell system is a CLI that provides an interface to connect and manipulate the database. On the other hand, HTTP Server is an simple API to make possible an integration.
Installing GhostDB
cd ghost-db
mkdir .appData
cp .env.example .env
make workspace-build
-
GhostDB Library
-
CLI
-
API
Library: Rust - Darkbird
HTTP Server: Rust Rocket
Shell: Rust
- Improving Rust skills
- Persistent data storage comprehension
- Improving data structures comprehension
- Improving Rust Rocket comprehension
GET /get-all
GET /get-one/${key}
Parameter | Type | Description |
---|---|---|
key |
string |
Required. Key of item to fetch |
POST /insert/
Body | Type | Description |
---|---|---|
key |
string |
Required. Data key |
value |
string |
Required. Data value |
PUT /update/${key}
Parameter | Type | Description |
---|---|---|
key |
string |
Required. Key of item to update |
DELETE /delete/${key}
Parameter | Type | Description |
---|---|---|
key |
string |
Required. Key of item to delete |
To run this project, you will need to add the following environment variable to your .env file
STORAGE_NAME