feat: phase 0+1 — workspace scaffold and protocol primitives

Phase 0: Cargo workspace with ericrfb (lib) and ericrfb-proxy (bin)
crates, .envrc for RUST_LOG, workspace dependency pins.

Phase 1: ericrfb/src/proto.rs implements all wire primitives:
- read/write helpers matching h.java (u8, i8, u16-BE, i16-BE, i32-BE)
- varint reader/writer matching aw.int() (1-3 bytes, Tight lengths)
- modified-UTF-8 string reader matching h.byte()
- RectHeader { x: u16, y: u16, w: u16, h: u16, encoding: i32 }
- RGB332 → RGBA compile-time LUT (256 entries)

20 tests including proptest varint roundtrip over [0, 2^22).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 13:44:24 +03:00
parent a60cee3f23
commit 3db2927add
9 changed files with 1698 additions and 0 deletions

13
Cargo.toml Normal file
View File

@@ -0,0 +1,13 @@
[workspace]
resolver = "2"
members = ["crates/ericrfb", "crates/ericrfb-proxy"]
[workspace.dependencies]
tokio = { version = "1", features = ["full"] }
axum = "0.7"
bytes = "1"
flate2 = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = "1"
thiserror = "2"