Skip to content

Reference FFI bindings (Ruby, JavaScript, Python) as an ABI usability test #11

Description

@sebyx07

Thin reference bindings for graph-lite, one per runtime, living outside the library: they exist to prove the C ABI is usable from outside, which is the only honest test of a C surface designed by C++ programmers.

Done when

  • Ruby (FFI), JavaScript (bun:ffi and/or N-API), Python (cffi) each: open a store, add nodes and edges, traverse, read properties, handle a status code, close.
  • Each binding is one file and needs no C compilation step beyond the shared library — if it needs a wrapper .c, the ABI is wrong, and that finding is the point of this issue.
  • Every friction point found is filed against the C surface rather than papered over in the binding.
  • Ownership rules are exercised: a buffer that is too small, a handle used after close, a code the binding does not recognise.

Notes

Not shipped as supported packages at this stage — reference quality, in-repo, to keep the feedback loop honest.

A binding in the engine's plugin language would currently trip scripts/lint/graph-lite-vocabulary.ts, which bans that language's name as a consumer dependency. If that binding becomes wanted, revisit the ban deliberately — do not add an allowlist entry.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions