Generate and verify Go FFI bindings - #374
Open
fuchsnj wants to merge 4 commits into
Open
Conversation
fuchsnj
marked this pull request as ready for review
July 24, 2026 19:26
vinckama
reviewed
Jul 27, 2026
| changes, install `cbindgen` 0.29.2 and regenerate the header: | ||
|
|
||
| ```shell | ||
| cargo install cbindgen --version 0.29.2 --locked |
Contributor
There was a problem hiding this comment.
To make this need self documented in the command if it's missing, would it be possible to add a pre-check before re-generating the bindings:
.PHONY: check-cbindgen
check-cbindgen: ## Ensure cbindgen is installed for Go binding header generation.
@if ! command -v cbindgen >/dev/null 2>&1; then \
echo "error: cbindgen is not installed (required for Go binding header generation)." >&2; \
echo "Install with: cargo install cbindgen --version 0.29.2" >&2; \
exit 1; \
fi
...
and then calling the check in update-sds-go-header
update-sds-go-header: check-cbindgen
vinckama
approved these changes
Jul 29, 2026
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.
Jira
The checked-in C header can drift from the Rust FFI while the Go bindings still compile, leaving runtime failures for downstream consumers. This generates the header from Rust with cbindgen and adds one CI check that verifies the header, builds the shared library, and runs the uncached Go binding suite.
This should help prevent issues such as ones fixed by this PR