diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs index 3669736..b38a967 100644 --- a/codegen/src/lib.rs +++ b/codegen/src/lib.rs @@ -43,6 +43,12 @@ pub struct GenRequest<'a> { pub mode: Mode, pub schemas: &'a [(String, Vec)], 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, } /// A code generator: frozen IR in, generated files out. diff --git a/conformance/tests/conformance.rs b/conformance/tests/conformance.rs index 386b9a3..c8da0c4 100644 --- a/conformance/tests/conformance.rs +++ b/conformance/tests/conformance.rs @@ -39,6 +39,7 @@ fn request(schemas: &[(String, Vec)]) -> GenRequest<'_> { name: "conformance".to_string(), version: "0.0.0".to_string(), }, + default_framing: None, } }