Skip to content

Rust emitter consumer model parity #568

Description

@flyingrobots

Migrated from a local Wesley Method backlog card after adopting METHOD v2.1.0 tracker doctrine.

  • Source path: docs/method/backlog/bad-code/SOURCE_rust-emitter-consumer-model-parity.md
  • Original filesystem lane: bad-code
  • Canonical Method lane label: lane:bad-code
  • Legend: SOURCE
  • Migration issue: Migrate Wesley Method backlog to GitHub Issues #548
  • Migrated on: 2026-06-04

Original Local Backlog Card

Rust emitter consumer model parity

  • Lane: bad-code
  • Legend: SOURCE

Why now

wesley emit rust now emits basic Rust model declarations from Wesley L1 IR
through a structured Rust AST/printer projection. That proves the Rust-native
model path for consumer-shaped GraphQL contracts, but it is still a model
surface rather than a complete runtime binding.

The jedit hot-text fixture remains useful coverage because it pressures real
consumer shapes. It should not make Wesley own jedit product behavior.

Hill

Wesley can generate a Rust contract model layer that external consumers can
treat as shared artifact truth, without handwritten shadow models beside the
authored GraphQL schema.

Done looks like

  • generated Rust output is documented with examples
  • object, interface, input object, enum, union, scalar, list, nullability, and
    reserved-word behavior are covered by golden tests
  • generated models can be consumed by an external Rust crate without local
    structural rewrites
  • serde behavior, crate imports, and custom scalar hooks are configurable enough
    for real consumers
  • operation/protocol generation has an explicit owner and does not get smuggled
    into the basic model emitter

Repo Evidence

  • crates/wesley-emit-rust/src/lib.rs
  • crates/wesley-cli/src/main.rs
  • test/fixtures/consumer-models/jedit-hot-text-core.graphql
  • crates/wesley-emit-typescript/src/lib.rs

Activity

  1. added
    triage:bad-codeDebt intake that still needs scheduling, closure, or a repo move
    legend:SOURCESource/schema/docs truth work
    on Jun 4, 2026
  2. coderabbitai commented on Jun 4, 2026

    @coderabbitai
    🔗 Related PRs

    #499 - test(stack): add Stack Witness 0001 fixture artifact shape [merged]
    #504 - Compile runtime optic artifacts [merged]
    #513 - expand parity fixture coverage [merged]
    #519 - v0.0.6 type-family parity projection [merged]
    #521 - Add Rust IR performance baseline [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    legend:SOURCESource/schema/docs truth worktriage:bad-codeDebt intake that still needs scheduling, closure, or a repo move

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions