7505e759e1f1932069333b12ac53bef944294b14
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.
continuum-schemas
Single source of truth for the Continuum data model. Protobuf definitions in
proto/ are compiled into two consumer packages:
packages/ts-types— TypeScript types generated viats-proto, plus hand-written TypeBox schemas undersrc/schemas/used for runtime validation incontinuum-backend's ElysiaJS routes.packages/rust-types— a Rust crate (continuum-rust-types) that compiles the same.protofiles withprost-build(viabuild.rs), producingserde-derived structs forcontinuum-proxyandcontinuum-ai-worker.
Layout
proto/continuum/v1/ canonical .proto message definitions
packages/ts-types/ TypeBox schemas + generated TS proto types
packages/rust-types/ prost-generated Rust structs (build.rs codegen)
Build
Requires protoc on PATH and npm install run at the repo root first.
npm install
npm run build:ts # protoc + ts-proto -> packages/ts-types/src/generated
npm run build:rust # cargo build, runs build.rs -> prost-generated structs
npm run build # both
Generated TS output under packages/ts-types/src/generated is build-derived
and gitignored. The Rust crate's generated code lands in OUT_DIR per
standard prost-build conventions and is never committed.
Description
Languages
Rust
61.2%
TypeScript
38.8%