//! Run with: cargo run --example bambu_protocol_demo //! //! Proves the whole pipeline end to end: a message written in //! continuum-schemas' proto/bambulab/v1/request.proto, compiled by prost //! into a real Rust struct, wrapped in the hand-written BambuRequest enum, //! and serialized by plain serde — no protobuf binary encoding involved, //! since Bambu's actual wire format is JSON over MQTT. use continuum_proxy::printer::BambuRequest; use continuum_types::bambulab::v1::InfoCommand; fn main() { let request = BambuRequest::Info(InfoCommand { sequence_id: "0".to_string(), command: "get_version".to_string(), }); let actual = serde_json::to_string(&request).unwrap(); let expected = r#"{"info":{"sequence_id":"0","command":"get_version"}}"#; println!("generated: {actual}"); println!("Bambu's real wire format: {expected}"); println!("match: {}", actual == expected); }