Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

PoloDB

> 数据库
Open source

PoloDB is an embedded document database.

1.2K stars0 likes3 views
WebsiteGitHub

About

PoloDB is an embedded document database.

An embedded document database for Rust with a MongoDB-like API.

PoloDB stores BSON documents locally and exposes familiar collection, query, update, index, aggregation, and transaction APIs. It can be used as an embedded Rust library or run as a standalone server with partial MongoDB wire protocol compatibility.

Features

  • Embedded, typed Rust API built around serde and BSON
  • MongoDB-like CRUD, query, update, index, and aggregation APIs
  • Explicit transactions and automatic per-operation transactions
  • Concurrent use through clonable database handles
  • RocksDB-backed persistent storage
  • Standalone server for supported MongoDB driver operations
  • Experimental Python bindings built from the same Rust core

Project status

The latest stable release is v5.3.0. See the changelog for release details.

PoloDB v5 uses RocksDB as its storage backend. A database path is a directory, not a single portable database file. The first build compiles the bundled RocksDB sources and can take several minutes.

Rust CI currently covers Ubuntu x64, Ubuntu ARM64, macOS, and Windows. Python bindings are tested on Python 3.12 through 3.14. Indexes, aggregation, the standalone server, and language bindings continue to evolve; test the behavior your application depends on before using PoloDB in production.

Installation

Add the embedded library and Serde to your project:

toml
[dependencies]
polodb_core = "5.3.0"
serde = { version = "1", features = ["derive"] }

Building requires a Rust toolchain, a C/C++ build toolchain, and Clang/libclang for the bundled RocksDB bindings.

Quick start

rust
use polodb_core::{bson::doc, CollectionT, Database};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
struct Book {
    title: String,
    author: String,
}

fn main() -> Result> {
    let db = Database::open_path("./data/books")?;
    let books = db.collection::("books");

    books.insert_one(Book {
        title: "The Three-Body Problem".to_string(),
        author: "Liu Cixin".to_string(),
    })?;

    let book = books.find_one(doc! {
        "author": "Liu Cixin",
    })?;

    println!("{book:?}");
    Ok(())
}

See the PoloDB documentation and polodb_core API documentation for queries, updates, indexes, aggregation, and transactions.

Standalone server

Install and start the server:

bash
cargo install polodb --version 5.3.0
polodb serve --path ./data/server --host 127.0.0.1 --port 27017

The server implements the subset of the MongoDB wire protocol used by its supported commands. It is not a drop-in replacement for a full MongoDB server.

Packages

Package Status Purpose
polodb_core Published Embedded Rust database library
polodb Published Standalone server and CLI
py-polodb Experimental Python bindings developed in this repository

Release binaries for the standalone server are published for macOS x64, Linux x64, and Windows x64 on the GitHub Releases page.

Roadmap and support

Open work is tracked in GitHub Issues. Mobile SDKs, additional language bindings, encryption, multikey indexes, and alternative storage backends require further design and are not part of the current stable feature set.

  • Documentation
  • Rust API
  • Issues
  • Discord

License

PoloDB is licensed under the Apache License 2.0.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcross-platformdatabasedocument-databaseembedded-database

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库