Skip to content

ffi: C ABI version and capability probes for downstream engines #122

Description

Summary

Add explicit C ABI version and capability probes so downstream engines can validate the ordvec runtime they are embedding.

This complements #87, which tracks C ABI builder/add APIs. This issue is about ecosystem compatibility and being a good neighbor to non-Rust host systems that need stable dynamic checks instead of relying on crate internals or build-time assumptions.

Current gap

The repo has a C ABI surface, but downstream vector DBs and language bindings need a clear way to ask: what ABI am I loaded against, what capabilities are present, and what compatibility rules apply?

Proposed shape

Sketch only:

uint32_t ordvec_abi_version(void);
const char *ordvec_version_string(void);
uint64_t ordvec_capabilities(void);
ordvec_status ordvec_get_last_error(char *buf, size_t len);

Capability flags could cover loaded-index search, builder/add support, subset rerank, docset search, mapped loading, and file-format probe support as those surfaces exist.

Acceptance criteria

  • C header exposes ABI version and capability flags.
  • Symbol names and bump rules are documented.
  • A C smoke test verifies version/capability calls from outside Rust.
  • Docs state what changes require an ABI version bump.
  • Does not require publishing the FFI crate until the maintainer decides that surface is ready.

Non-goals

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestffiFFI / C ABI / cross-language bindings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions