// the find
duckdb/duckdb-rs
Ergonomic bindings to duckdb for Rust
Rust bindings for DuckDB, modeled closely after rusqlite. If you're already using DuckDB elsewhere and want to embed it in a Rust service — for ETL, analytics, or local-first data processing — this is the path of least resistance. Now officially maintained under the duckdb org, which matters for longevity.
The rusqlite-style API means anyone who's done SQLite in Rust will be productive in under an hour. The bundled feature vendoring DuckDB's source is a genuine convenience — no system library dance, no version mismatch surprises. Arrow and Parquet support are first-class, not bolted on: you can push/pull RecordBatches directly, which makes this genuinely useful for data pipeline work rather than just toy queries. The loadable-extension path plus the extension-template-rs integration means you can write DuckDB extensions in Rust without fighting the build toolchain yourself.
Connection is Send but not Sync, so multi-threaded use requires either r2d2 or rolling your own connection management — not a dealbreaker but means you can't just throw a shared Arc<Connection> around. The bundled feature omits ICU, so date arithmetic like `now() - interval '1 day'` silently fails unless you either INSTALL icu at runtime or build with bundled-cmake — this will catch people. The bundled-cmake path is marked experimental and can't be published to crates.io (sources are too large), which is a real gap if you need ICU or jemalloc in a published library. Cross-compilation with bundled is best-effort with no CI coverage, so if you're targeting ARM from x86 you're on your own.