Installation
These instructions install PoloDB v5.2.0.
Install as an embedded database
Run the following Cargo command in your project directory:
cargo add polodb_core@5.2.0To use typed Rust structs with the examples in this documentation, add Serde with its derive macros:
cargo add serde --features deriveThe embedded library stores data persistently in a RocksDB-backed directory and does not require a standalone database process.
Install as a standalone database
Install the polodb executable with Cargo:
cargo install polodb --version 5.2.0Alternatively, download a prebuilt x64 executable for macOS, Linux, or Windows
from the
v5.2.0 release page (opens in a new tab)
and place it on your PATH.
Start the server with a persistent database directory:
polodb serve --path ./polodb-dataBy default, PoloDB listens on localhost:27017. Connect with a MongoDB client
using this URI:
mongodb://localhost:27017Use --host and --port to change the listening address:
polodb serve --path ./polodb-data --host 0.0.0.0 --port 27018