Accepted (2026-05-12; records the Sprint 5-1 / G3 decision retroactively)
Nexterm's IPC (Unix socket on Linux/macOS, named pipe on Windows, between client and server) sends ClientToServer / ServerToClient messages through serde.
We started with bincode 1.x. It is widely used in the Rust ecosystem, serde-compatible, and concise.
- RUSTSEC-2025-0141: an advisory was published noting that bincode 1.x is at risk of becoming unmaintained.
- We worked around it by adding ignores to
.cargo/audit.toml/deny.tomlforcargo audit, but that is not a fundamental fix — a dependency-side advisory could still become a CVE in the future.
- bincode 2.x: the API is redesigned, so there is a migration cost, but it is in the same family.
- postcard: designed for no_std / embedded but a good fit for Nexterm. Smaller payloads, actively maintained, no RUSTSEC advisories.
- rmp-serde (MessagePack): highly compatible, but loses to postcard on both size and speed.
The audit flagged "migrate from bincode 1.x to postcard" at CRITICAL priority — one of the top items for Sprint 5+.
Migrate to postcard 1.x.
nexterm-proto/Cargo.toml— drop the bincode dependency and add postcard.- Rewrite serialization at every IPC endpoint to postcard:
nexterm-server/src/ipc/nexterm-client-gpu/src/connection.rsnexterm-client-tui/nexterm-ctl/src/ipc.rsnexterm-launcher/(removed in v1.4.0)
- Bump
PROTOCOL_VERSION1 → 2 → 3 to mark the migration stages.- v1: bincode
- v2: postcard with the old field layout
- v3: postcard with the message layout cleaned up in Sprint 5-1
- Add postcard round-trip tests (
#[cfg(test)]module innexterm-ctl/src/main.rs). - Remove the bincode ignore from
cargo audit.
- The message-length prefix (4-byte LE) is unchanged.
- Byte counts are slightly smaller (postcard's varint encoding is more efficient).
- Benches (measured in Sprint 5-3): parse speed is on par or slightly faster.
- Resolves the RUSTSEC advisory.
- One entry removed from the
cargo auditignore list. - Binaries are slightly smaller (postcard varints).
- Depends on an actively maintained library.
- Migration was an L-sized effort (spread across many crates).
- postcard's API is subtly different from bincode (some learning cost).
- Old v1 clients are no longer compatible — clients and servers must update together.
- Alternative A: stay on bincode 1.x with ignores — carries the future-CVE risk forever.
- Alternative B: upgrade to bincode 2.x — comparable migration cost (the API was redesigned), and similar problems could recur later.
- Alternative C: rmp-serde (MessagePack) — loses on size and speed compared to postcard.
- Alternative D: a custom format — needlessly complex.
- Sprint 5-1 progress:
memory/project_sprint5_1_progress.md - Audit round 2, item G3
- RUSTSEC-2025-0141: bincode 1.x advisory
- postcard upstream: https://github.com/jamesmunns/postcard
- Sprint 5-3 benchmarks:
docs/benchmarks.md(postcard's impact on VT-layer parse speed is negligible)