0.1.0-beta.8.
Highlights
- Bundled DuckDB — the DuckDB C library compiles straight in; no system package, no runtime dependency to install.
- Row-oriented, Arrow-optional — direct access to rows and values with a lean dependency tree,
ideal for application-level OLAP. An opt-in
arrowfeature exports results via the Arrow C Data Interface with no added dependencies. - Safe by construction — every FFI call is wrapped; nothing
unsafeleaks into your code, across the full DuckDB type system. - Comprehensive type coverage — integers of every width,
DECIMAL,UUID,BIT,BIGNUM, temporals, and the compositeLIST/ARRAY/STRUCT/MAP/UNION/ENUMtypes. - Diesel 2.3 ORM backend — a full custom backend: query DSL, migrations, an r2d2 pool, and a large library of DuckDB-specific SQL functions, aggregates, and operators.
- User-defined functions & derives — register plain Rust functions as scalar / table / aggregate
/ cast functions, and map Rust structs and enums to DuckDB rows and types with
#[derive(…)]— nounsafe, no manual vector handling. - Embedded-first — designed to run inside Tauri desktop apps, iOS cross-builds, and other environments where a system library isn’t an option.
The crates
better-duck is a small family of crates. Most users depend onbetter-duck-core (and, for the
ORM, better-duck-diesel); the rest are pulled in automatically or used only in specific contexts.
The crate published as
better-duck on crates.io is better-duck-core. Throughout these docs,
“the core crate” means better-duck-core.Supported platforms
The minimum supported Rust version (MSRV) is 1.96. better-duck is licensed under either
MIT or Apache-2.0, at your option. See
Versioning & compatibility for the beta policy and upgrade
guidance.
Where to next
Installation
Add the crates to your
Cargo.toml and pin the exact beta version.Quickstart
Open a connection, create a table, insert data, and read rows end-to-end.
Architecture
The crate family, the FFI safety model, and bundled DuckDB.
Feature flags
Every Cargo feature of
better-duck-core and when to enable it.Choosing an API
Core vs the Diesel backend vs the Tauri plugin, with a feature-flag decision tree.
Core crate
The driver API: connections, queries, values, appender, pooling, async.
Diesel backend
The Diesel 2.3 ORM backend for DuckDB.
DuckDB essentials
The dialect, type system, extensions, and engine behavior through the driver.