videre: bind venue id to the adapter manifest name - #577
Merged
Conversation
This was referenced Jul 24, 2026
mfw78
added a commit
that referenced
this pull request
Jul 27, 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.
What
Bind a venue id to its adapter manifest name at compile time.
#[videre_sdk::venue(id = "cow", body = CowIntentBody)]on theimpl Venue for CowVenue {}block fills theVenuemarker (const ID,type Body) and, at expansion, reads$CARGO_MANIFEST_DIR/module.tomland emitscompile_error!when the id disagrees with[module] name. The manifest is anchored viainclude_bytes!so a manifest edit re-runs the check.The attribute dispatches on argument presence: with args it takes the new marker path (no component world), with no args it takes the existing adapter-world path (still required on
impl VenueAdapter). A keeper links the client slice, never the adapter slice, so it cannot generate a world.Why
CowVenue::IDwas a hand-typedVenueId::from_static("cow")with nothing holding it to the manifest name the host installs under, so a rename of one and not the other compiled and failed only as a runtime routing fault. The macro makes the two drift a build error, keeping the id explicit at the definition site rather than making the manifest authoritative. It is opt-in, so hand-writtenVenueimpls with hand-typed ids keep compiling.Testing
cargo fmt --all --check,cargo clippy --workspace --all-targets --all-features --locked -D warnings, all 17 guest wasms (16 modules plus the cow adapter),cargo nextest run --workspace --all-features --locked,cargo test --doc,RUSTDOCFLAGS=-D warnings cargo doc --workspace --no-deps --locked,scripts/check-venue-agnostic.sh,scripts/check-cow-orderbook-only.sh.AI Assistance
Implemented with Claude Code.
Closes #543