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;
// Fields/messages genuinely shared between v1 and v2 (unversioned, since
// they don't change across generations) go here — composition, embedded as
// a field in v1/v2 messages via `import "bambulab/common.proto";`, not
// inheritance. e.g. every Bambu command/response shares sequence_id +
// command; that's a good candidate for a message here.