Repository navigation
add a stastic library target - #61
Merged
Merged
Conversation
also generate a .pc file, for external programs to correctly link with it. defauls is still a shared library. Fixes: lancedb#61 Signed-off-by: Yuval Lifshitz <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR adds a CMake-controlled choice between building/installing LanceDB as a shared vs static library, and introduces generation/installation of a pkg-config .pc file so external consumers can link against the library (including static-link native dependencies).
Changes:
- Introduces
BUILD_SHARED_LIBSto switch between imported shared vs staticlancedbtargets and adjusts install behavior accordingly. - Adds a CMake probe (
ProbeRustNativeLibs.cmake) to detect Rust’s required native static link libraries and wires those into the static target and.pcfile. - Updates CI to build shared on Ubuntu/macOS and additionally build static on Ubuntu.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lancedb.pc.in | Adds a pkg-config template for consumers to discover include/lib flags and (for static) native link libs. |
| CMakeLists.txt | Adds BUILD_SHARED_LIBS, static/shared imported target selection, .pc generation, and updated install logic. |
| cmake/ProbeRustNativeLibs.cmake | New probe script to extract Rust native static link libraries for static builds and pkg-config output. |
| .github/workflows/ci.yml | Extends CI matrix to include a static Ubuntu build and passes BUILD_SHARED_LIBS accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jul 13, 2026
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.
also generate a .pc file, for external programs
to correctly link with it.
defauls is still a shared library.