bc4ee8690a7f39048750dc35e8e23d5b0c255765
Reconsidered after actually feeling the friction: this data is JSON over MQTT (not binary protobuf), only continuum-proxy ever parses it (raw vendor wire format, never crosses into TS), so none of protobuf's actual value (cross-language codegen, binary wire efficiency) applied here. Every gotcha hit while building this (field_attribute's oneof/variant path collision, needing .bambulab-scoped type_attribute calls, explicit #[serde(default)] per not-always-present field) came from forcing prost-build's codegen model onto a plain-JSON, Rust-only use case. Verified the replacement is strictly simpler, not just smaller: a hand-written struct's Option<T> field needs zero extra attributes to handle a missing JSON key (prost's generated String needed an explicit field_attribute call per field), and #[serde(flatten)] on a hand-written field has no ambiguity at all (prost-build's oneof/variant path collision doesn't exist without prost-build's codegen in the picture). The replacement lives in continuum-proxy: src/printer/bambu_commands/. continuum.v1 is unaffected — that schema is genuinely cross-language and proto still earns its keep there.
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%