Skip to content

Enable static DuckDB extensions via Cargo in checkouts#732

Draft
mlafeldt wants to merge 10 commits intomainfrom
bundled-cmake
Draft

Enable static DuckDB extensions via Cargo in checkouts#732
mlafeldt wants to merge 10 commits intomainfrom
bundled-cmake

Conversation

@mlafeldt
Copy link
Copy Markdown
Member

@mlafeldt mlafeldt commented Mar 26, 2026

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.

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

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