Skip to content

feat(cast): hand-rolled Cast CastMessage codec - #74

Open
susamn wants to merge 1 commit into
feature/cast-skeletonfrom
feature/cast-chromecast-proto
Open

feat(cast): hand-rolled Cast CastMessage codec#74
susamn wants to merge 1 commit into
feature/cast-skeletonfrom
feature/cast-chromecast-proto

Conversation

@susamn

@susamn susamn commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Stacked on #73.

internal/cast/castproto encodes/decodes the Cast channel protocol's CastMessage in protobuf wire format directly, plus 4-byte length-prefixed framing.

Deviation from the plan (which called for google.golang.org/protobuf + a generated binding): CastMessage has six scalar fields and a frozen protocol version, so a hand-written codec avoids a large module + codegen step. Unknown fields are skipped so a protocol extension won't break decoding.

Round-trip + known-byte tests. No new dependencies. Not wired to a provider yet.

internal/cast/castproto encodes/decodes the Google Cast channel
protocol's CastMessage in protobuf wire format directly, plus the
4-byte length-prefixed framing.

Deviation from the plan (which called for google.golang.org/protobuf +
a generated binding): CastMessage has six scalar fields we ever touch
and a frozen protocol version, so a hand-written codec avoids a large
module and a codegen step for the project -- matching the "keep
dependencies minimal" goal. Round-trip and known-byte tests included;
unknown fields are skipped so a protocol extension won't break decoding.

No new dependencies. Not wired into a provider yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JBJdG8Qenand5i16WT6BHG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant