| Crates.io | aurora-db |
| lib.rs | aurora-db |
| version | 0.2.1 |
| created_at | 2025-03-17 06:47:31.591901+00 |
| updated_at | 2025-07-03 12:54:40.578732+00 |
| description | A hybrid embedded document database with key-value storage, document collections, and optional network servers. |
| homepage | https://github.com/bethel-nz/aurora |
| repository | https://github.com/bethel-nz/aurora |
| max_upload_size | |
| id | 1595132 |
| size | 292,207 |
A hybrid embedded document database with key-value storage and document collections.
To use Aurora DB as an embedded library in your Rust project, add it to your Cargo.toml:
[dependencies]
aurora_db = "0.1.0"
tokio = { version = "1", features = ["full"] }
use aurora_db::{Aurora, FieldType, Value};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Open database in a temporary directory
let db = Aurora::open("my_database")?;
// Create a new collection for users
db.new_collection("users", vec![
("name", FieldType::String, false),
("email", FieldType::String, true), // unique field
("age", FieldType::Int, false),
])?;
// Insert a document
db.insert_into("users", vec![
("name", Value::from("Jane Doe")),
("email", Value::from("jane@example.com")),
("age", Value::from(28)),
])?;
// Query for users older than 25
let users = db.query("users")
.filter(|f| f.gt("age", 25))
.collect()
.await?;
println!("Found {} user(s).", users.len());
// -> Found 1 user(s).
Ok(())
}
Aurora DB can also run as a standalone server, accessible over the network. The server is provided as a separate binary within the crate, enabled by feature flags.
http: Enables the Actix-powered HTTP/JSON REST API.binary: Enables the high-performance Bincode-based TCP server.full: Enables both servers.To run the server binary, use the --features flag with Cargo:
# Run the HTTP server on port 7879
cargo run --bin aurora-db --features http
# Run the binary server on port 7878
cargo run --bin aurora-db --features binary
# Run both servers simultaneously
cargo run --bin aurora-db --features full
See the docs directory for detailed guides on CRUD operations, querying, and schema management.
Aurora DB delivers fast performance across various operations:
Operation 'Database initialization' took: 103.54ms
Operation 'Basic KV operations' took: 307.40µs
Operation 'Collection setup' took: 3.25ms
Operation 'Query books by Author' took: 759.70µs
Currently in beta. Core functionality is stable and actively developed.
MIT License