Wire up proto/bambulab/ build pipeline (boilerplate — message bodies TBD)
Adds bambulab/v1 and bambulab/v2 to the prost-build pipeline, scoped
separately from continuum.v1's camelCase convention: bambulab.* uses
snake_case, matching Bambu's actual MQTT wire JSON exactly, since this is
edge-only traffic (continuum-proxy) that has to match the printer's real
format rather than a schema we get to design.
Verified the scoping doesn't collide: type_attribute calls are cumulative,
so the existing '.' blanket selector had to become '.continuum' specifically
- keeping it global would stack a second, conflicting #[serde(rename_all)]
onto every bambulab type too and fail to compile.
No message bodies added - proto/bambulab/{common,v1/*,v2/*}.proto are
intentionally just syntax+package+guidance comments (matching what was
already started for v1). build.rs has inline notes on the two real gotchas
already hit while prototyping this: the field_attribute path-matching
oneof/variant collision (solution: hand-write the envelope enum in Rust
instead of modeling it as a proto oneof), and serde needing #[serde(default)]
on fields that aren't always present.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package bambulab.v1;
|
||||
|
||||
// import "bambulab/common.proto"; once common.proto has a shared message
|
||||
// worth embedding (composition, not inheritance — see that file).
|
||||
|
||||
// Your report/response messages go here, e.g.:
|
||||
//
|
||||
// message InfoResponse {
|
||||
// string sequence_id = 1;
|
||||
// string command = 2;
|
||||
// string result = 3; // not always present — see build.rs field_attribute
|
||||
// string reason = 4; // not always present — see build.rs field_attribute
|
||||
// }
|
||||
@@ -0,0 +1,13 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package bambulab.v1;
|
||||
|
||||
// import "bambulab/common.proto"; once common.proto has a shared message
|
||||
// worth embedding (composition, not inheritance — see that file).
|
||||
|
||||
// Your command messages go here, e.g.:
|
||||
//
|
||||
// message InfoCommand {
|
||||
// string sequence_id = 1;
|
||||
// string command = 2;
|
||||
// }
|
||||
Reference in New Issue
Block a user