Enable static DuckDB extensions via Cargo in checkouts#732
Draft
Enable static DuckDB extensions via Cargo in checkouts#732
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds an experimental
bundled-cmakebuild path for duckdb-rs checkouts. It keeps the existingbundledfeature unchanged, and adds a higher-priority bundled backend that builds DuckDB through upstream CMake whenbundled-cmakeis enabled.Only in-tree static extensions such as
icuare 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 likesqlite_scannerare 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.gzdoes not contain the full source tree).Fixes #461