Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ pub struct GenRequest<'a> {
pub mode: Mode,
pub schemas: &'a [(String, Vec<FrozenUnit>)],
pub package: PackageMeta,
/// Consumer-set fallback wire framing (`comline.toml`'s
/// `[generate] default_framing`), applied by a generator to any protocol
/// that does not pick one itself with `@framing`. `None` ⇒ the generator's
/// built-in default. The value is a framing name the generator recognises
/// (`"jsonrpc"`, `"datagram"`, …); an unknown one falls back to the default.
pub default_framing: Option<String>,
}

/// A code generator: frozen IR in, generated files out.
Expand Down
1 change: 1 addition & 0 deletions conformance/tests/conformance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fn request(schemas: &[(String, Vec<FrozenUnit>)]) -> GenRequest<'_> {
name: "conformance".to_string(),
version: "0.0.0".to_string(),
},
default_framing: None,
}
}

Expand Down
Loading