JingsongLi opened a new pull request, #38: URL: https://github.com/apache/paimon-vector-index/pull/38
## Summary Add a mosaic-style C FFI integration layer for Paimon Vector Index, plus C/C++ smoke tests and a C++ RAII facade. Rework the Python package to use the shared FFI library through `ctypes` instead of maintaining a separate PyO3 extension. ## Changes - Add `paimon-vindex-ffi` as a workspace crate that builds `libpaimon_vindex_ffi` and generates `include/paimon_vindex.h` with cbindgen. - Expose writer/reader opaque handles, callback-based positional I/O, metadata, single-query search, batch search, and roaring-filter search through the C ABI. - Add C and C++ smoke tests, plus `include/paimon_vindex.hpp` as a small RAII wrapper over the C ABI. - Replace the Python Rust extension package with a pure Python `ctypes` package that loads `libpaimon_vindex_ffi` and preserves the `VectorIndexWriter` / `VectorIndexReader` API shape. - Update CI to build and test C, C++, and Python against the FFI shared library. - Update README development and API documentation for C FFI, C++, and Python ctypes usage. ## Testing - [x] `cargo fmt --all -- --check` - [x] `cargo clippy --all-targets --workspace -- -D warnings` - [x] `cargo build --release -p paimon-vindex-ffi` - [x] `cc -std=c11 -I include c/test_vindex.c target/release/libpaimon_vindex_ffi.dylib -o c/build/test_vindex_direct && c/build/test_vindex_direct` - [x] `c++ -std=c++17 -I include cpp/test_vindex.cpp target/release/libpaimon_vindex_ffi.dylib -o cpp/build/test_vindex_cpp_direct && cpp/build/test_vindex_cpp_direct` - [x] `PAIMON_VINDEX_LIB_PATH=... pytest -v` from `python` in a local virtualenv - [x] `cargo test --workspace --lib --tests -- --test-threads=1` ## Notes The generated C header `include/paimon_vindex.h` is intentionally ignored and regenerated by the FFI crate build, matching the Paimon Mosaic layout. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
