Skip to content

feat(codegen): GenRequest.default_framing — consumer framing fallback - #17

Merged
Kinflou merged 1 commit into
masterfrom
feat/gen-default-framing
Sep 2, 2026
Merged

feat(codegen): GenRequest.default_framing — consumer framing fallback#17
Kinflou merged 1 commit into
masterfrom
feat/gen-default-framing

Conversation

@Kinflou

@Kinflou Kinflou commented Sep 2, 2026

Copy link
Copy Markdown
Member

First of a short chain that makes comline.toml able to say "this package's protocols speak JSON-RPC" without annotating every protocol.

GenRequest gains default_framing: Option<String> — a consumer-set fallback a generator applies to any protocol with no @framing of its own. None keeps the generator's built-in default (datagram for Rust). The contract crate treats it as an opaque name string; the target generator recognises and validates it.

  • conformance — the shared request() helper passes default_framing: None; goldens unchanged.
  • No rev bumps here. Downstream (comline-rust reads it in framing_choice, cli fills it from comline.toml) follows once this merges.

A generator can now be told a fallback wire framing to apply to any
protocol that does not select one itself with `@framing`. The CLI fills
it from `comline.toml`'s `[generate] default_framing`; `None` keeps each
generator's built-in default (datagram for Rust).

Opaque to the contract crate — the value is just a framing name string
the target generator recognises and validates.

conformance: the shared `request()` helper passes `default_framing: None`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant