Generate the GoMEOS flat FFI layer from the MEOS-API catalog#8
Merged
estebanzimanyi merged 1 commit intoJul 11, 2026
Merged
Conversation
Member
Author
|
Depends on MobilityDB/MEOS-API#52. CI derives the catalog via |
This was referenced Jul 11, 2026
Closed
Add a codegen (tools/codegen.py) that projects the MEOS-API meos-idl.json catalog into a flat FFI Go package (functions/), with the JMEOS marshalling convention: char* maps to string, every other pointer to an opaque handle, enums to int, function pointers to a raw pointer. CI derives the catalog and an all-families libmeos from a single MobilityDB commit via the shared provision-meos action, regenerates the package, builds and tests it, and reports drift against the committed snapshot without failing the build (the snapshot is a convenience projection for go-get consumers). The committed catalog is dropped from git and derived in CI. The portable bare-name parity gate runs against the functions package. The vendored headers and the hand layer are adapted to the current MEOS.
718d2d2 to
450f832
Compare
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.
Make GoMEOS a catalog-driven binding: the flat FFI layer is generated from
the MEOS-API catalog (
meos-idl.json) and derived in CI, so no MEOS headeris parsed in this repository.
What this delivers
tools/codegen.pyemits the flat FFI layer into the repo-rootfunctionspackage (mirroring JMEOS
functions/pymeos_cffi.functions): every MEOSstruct is an opaque handle,
char*is marshalled asstringviacstring_to_text/text_to_cstring, enums are typed ints, and C functionpointers are
*[0]byte— the JMEOS-flat convention, no array unpacking.types.gotype layer (opaque handles + catalog enums) is emitted only forsymbols the wrappers actually reference.
buildworkflow provisions the catalog and the all-families libmeos fromMobilityDB via the shared
provision-meosaction, regeneratesfunctions/,fails if the committed generated code drifts from the catalog, then
compiles the package against the installed libmeos and runs the
portable-parity gate (29/29 bare names, all six families).
functionspackage is the checked-in artifact.The hand-written OO
gomeospackage is left in place; regenerating it too fromthe catalog's
objectModelis tracked as follow-up work.