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:
2026-08-28 22:38:20 +00:00
parent e806a13c70
commit 7505e759e1
6 changed files with 94 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
syntax = "proto3";
package bambulab.v2;
// import "bambulab/common.proto"; once common.proto has a shared message
// worth embedding (composition, not inheritance — see that file).
// V2-generation (X1/H2 series) report/response messages go here — e.g.
// whatever AMS/report-schema fields V2 has that V1 doesn't.