Skip to content

fix: CMake export, C API exports, drop/create scalar index, release CI#493

Open
ghshhf wants to merge 1 commit into
alibaba:mainfrom
ghshhf:main
Open

fix: CMake export, C API exports, drop/create scalar index, release CI#493
ghshhf wants to merge 1 commit into
alibaba:mainfrom
ghshhf:main

Conversation

@ghshhf

@ghshhf ghshhf commented Jun 13, 2026

Copy link
Copy Markdown

Summary

This PR fixes multiple issues and adds CI improvements.

Changes

Fix #468: Add CMake package export support

  • Add install(EXPORT ...) to CMakeLists.txt (root, src, src/binding/c)
  • Create cmake/zvecConfig.cmake.in template
  • Users can now find_package(zvec) and find_package(zvec COMPONENTS c_api)

Fix #427: Support DROP + CREATE scalar index

  • Modify src/db/index/segment/segment.cc to allow recreation of scalar index after drop
  • Add tests: Feature_DropAndRecreateScalarIndex, Feature_DropAndRecreateScalarIndex_MultipleFields

Fix #443: Export missing C API functions

  • Add standalone Reranker C API: zvec_reranker_create_rrf(), zvec_reranker_create_weighted(), zvec_reranker_destroy()
  • Add zvec_multi_query_set_reranker()
  • Add zvec_doc_set_sparse_vector()
  • All functions have ZVEC_EXPORT and proper opaque pointer types

Add #390: Release pre-built libraries CI workflow

  • Add .github/workflows/09-release-build.yml
  • Multi-platform matrix build (shared + static libraries):
    • Ubuntu 20.04/22.04/24.04 (x64), Ubuntu 22.04 (arm64)
    • macOS 13 (Intel x86_64), macOS 14 (Apple Silicon arm64)
    • Windows 2022/2025 (x64)
    • Fedora 39/40/41 (via Docker container)
  • Trigger: push tags v* or manual dispatch
  • Optional GitHub Release publishing

Test plan

  • CMake package export works (find_package(zvec))
  • C API functions link correctly
  • Drop + create scalar index round-trip passes
  • CI workflow tested on fork (release-build.yml)

…uild CI, drop/create scalar index

- Fix alibaba#468: Add CMake package export support (find_package(zvec))
  - Add install(EXPORT) to all CMakeLists.txt
  - Create cmake/zvecConfig.cmake.in template
  - Support find_package(zvec COMPONENTS c_api)

- Fix alibaba#427: Support DROP + CREATE scalar index
  - Modify segment.cc to allow recreation of scalar index

- Fix alibaba#443: Export missing C API functions
  - Add zvec_reranker_create_rrf/weighted/destroy
  - Add zvec_multi_query_set_reranker
  - Add zvec_doc_set_sparse_vector

- Add alibaba#390: Release pre-built libraries CI workflow
  - Add .github/workflows/09-release-build.yml
  - Multi-platform: Ubuntu 20.04/22.04/24.04, macOS 13/14, Windows 2022/2025
  - Add Fedora 39/40/41 builds via Docker container
  - Build both shared and static libraries

- Add tests for drop-and-recreate scalar index
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


ghshhf seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

8 participants