feat(CHAIN-3336): add Rust bindings and reorganize bindings directory#200
Open
xenoliss wants to merge 7 commits intobo/chain-3335from
Open
feat(CHAIN-3336): add Rust bindings and reorganize bindings directory#200xenoliss wants to merge 7 commits intobo/chain-3335from
xenoliss wants to merge 7 commits intobo/chain-3335from
Conversation
jackchuma
reviewed
Mar 4, 2026
jackchuma
reviewed
Mar 4, 2026
Contributor
jackchuma
left a comment
There was a problem hiding this comment.
There's no CI check or script to verify that committed artifacts in bindings/rust/artifacts/ match the current compiled output from forge build. If someone modifies FlashblockIndex.sol without regenerating the artifact, the Rust bindings will silently be out of sync.
Can we also add a CI step or a just recipe that:
- Runs
forge build - Compares
forge-artifacts/FlashblockIndex.sol/FlashblockIndex.jsonwithbindings/rust/artifacts/FlashblockIndex.json - Fails if they differ
This would be analogous to the existing snapshots-check pattern
jackchuma
reviewed
Mar 4, 2026
jackchuma
reviewed
Mar 5, 2026
Contributor
jackchuma
left a comment
There was a problem hiding this comment.
We also probably want to add a CI step that confirms the generated rust bindings compile. What do you think?
jackchuma
approved these changes
Mar 5, 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.
Summary
Reorganize contract bindings under a single
bindings/directory with language-specific subdirectories:bindings/go/— existing Go bindings (BalanceTracker, FeeDisburser) moved frombindings/bindings/rust/— new Rust bindings crate (base-contracts-bindings) using Alloy'ssol!macro, moved fromcrates/bindings/The Rust crate exposes typed bindings (ABI + bytecode) generated from committed Forge artifacts, so downstream Rust consumers can depend on it via Cargo without needing Foundry.