BonsaiDb

A Rust database that grows with you.


BonsaiDb is considered alpha software. It is under active development (GitHub commit activity). There may still be bugs that result in data loss. All users should regularly back up their data and test that restoring from backup works correctly.
User's Guide Documentation Discord Source Code

Getting Started with Local-only Databases

Add BonsaiDb to your Cargo.toml:

[dependencies]
bonsaidb = { version = "0.4", features = ["local"] }

Local-only Examples

Each of these examples can be run within the BonsaiDb repository by executing cargo run --example EXAMPLE-NAME.

Getting Started with Client/Server Databases

Add BonsaiDb to your server's Cargo.toml:

[dependencies]
bonsaidb = { version = "0.4", features = ["server"] }

And to your client's Cargo.toml:

[dependencies]
bonsaidb = { version = "0.4", features = ["client"] }

Client/Server Examples

Each of these examples can be run within the BonsaiDb repository by executing cargo run --example EXAMPLE-NAME.

The examples for local-only databases are focused on teaching the basics on BonsaiDb and apply to all forms of accessing BonsaiDb, including Client/Server. If you're new to BonsaiDb, it might be best to start with the local-only examples while learning the fundamentals.