Repository navigation
Add a Rust binding emitter - #11
Open
magic-peach wants to merge 3 commits into
Open
magic-peach wants to merge 3 commits into
magic-peach wants to merge 3 commits into
Conversation
magic-peach
force-pushed
the
add-rust-binding-emitter
branch
from
October 20, 2026 16:55
bf1f99a to
04e2d7a
Compare
magic-peach
force-pushed
the
add-rust-binding-emitter
branch
from
October 23, 2026 18:20
5eda3bd to
056e32c
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.
Adds a native Rust binding emitter under
tooling/extension-bindings/emitters/rust/, following the structure of the TypeScript (#9) and Java (#10) emitters, and wires it into the orchestrator and generation workflow.Emitter
emit,verifyandapicommands.verifyre-renders the package from the model and requires every file to match, and parses the source withsyn.--jsonprints errors as structured JSON.RCRdiagnostics carry a category, code, coordinate and JSON Pointer, and are documented inCONTRACT.md.Cargo.toml,src/lib.rs,src/bindings.rs, one module per type undersrc/bindings/, and the binding manifest. Markers are traits with anrc_marker_<hex>method, objects are structs, unions are enums, and a reference is boxed only when it lies on a cycle.r#type). Source is formatted withrustfmt, and every type and field has a doc comment naming its source. An optionalserdefeature adds derives.Orchestrator and CI
rc bindingsbuilds and runs the Rust emitter, assembles resources intoruntimeconditions/, verifies withrustc,rustfmtandcargo check, and archives a deterministic zip. Rust releases record no profiler because none exists; the release schema forbids one for Rust.packages.yamlhas Rust entries forcommon-integrationsandenv-configuration.generate-rust.py, thebinding-toolsaction andbinding-generate.ymlgenerate them like Go and Python.verify-rust-emitterjob on Ubuntu and macOS, alanguages.rusttoolchain lock entry, and a placeholder crates.io publish workflow.language: rust.Tests
cargo testand clippy pass. Conformance and first-party models are emitted three times byte-identically, verified, compiled as libraries and run through an exercise program that builds every type. Provider stub crates check imported markers, and a stub with a different marker method must fail to compile. Each crate passescargo checkwith and without--features serde, and dependency-free crates round-trip every value through JSON. Negative fixtures check exact diagnostics, and a Go test covers the orchestrator pieces. The wholerc bindingspipeline (update,check,package) passes on the two Rust targets.Not covered
Models using a JSON value skip the provider-stub variant, crates.io publication is a placeholder, and the released toolchain lock still needs a pinned emitter digest.