Skip to content

Enable static DuckDB extensions via Cargo in checkouts#732

Merged
mlafeldt merged 19 commits into
mainfrom
bundled-cmake
Apr 10, 2026
Merged

Enable static DuckDB extensions via Cargo in checkouts#732
mlafeldt merged 19 commits into
mainfrom
bundled-cmake

Conversation

@mlafeldt

@mlafeldt mlafeldt commented Mar 26, 2026

Copy link
Copy Markdown
Member

This PR adds an experimental bundled-cmake build path for duckdb-rs checkouts. It keeps the existing bundled feature unchanged, and adds a higher-priority bundled backend that builds DuckDB through upstream CMake when bundled-cmake is enabled.

Only in-tree static extensions such as icu are supported for now, but there's a path toward future out-of-tree extension support. In fact, I think using CMake is the only realistic path toward out-of-tree extensions. Features like sqlite_scanner are already part of DuckDB's checked-in extension configs. Reusing that upstream mechanism is much more maintainable than inventing a parallel extension build/link system in Rust. Let DuckDB build DuckDB.

Update: For out-of-tree extensions, see #734

Although this PR only targets checkout builds, the CMake backend is structured so that a future crates.io-friendly variant could reuse the same backend logic after downloading the DuckDB sources (duckdb.tar.gz does not contain the full source tree).

Fixes #461

@mlafeldt mlafeldt self-assigned this Apr 9, 2026
@mlafeldt mlafeldt marked this pull request as ready for review April 10, 2026 07:57
@mlafeldt

Copy link
Copy Markdown
Member Author

Merging as an experimental addition, subject to change.

@mlafeldt mlafeldt merged commit 56c5269 into main Apr 10, 2026
7 checks passed
@mlafeldt mlafeldt deleted the bundled-cmake branch April 10, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the option to statically link extensions and disable further extension installation

1 participant