Skip to content

quest(rs2ts): Generated @moq/net - #4437

Draft
kixelated wants to merge 15 commits into
devfrom
quest/m1/rs2ts/README
Draft

kixelated wants to merge 15 commits into
devfrom
quest/m1/rs2ts/README

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Questline: Generated @moq/net. moq-net becomes the single MoQ implementation, and the browser runs it as TypeScript generated by rs/rs2ts.

Stays a draft until every child quest merges. Based on #4428 (main into dev), which carries the quest files. Child PRs target this branch, except JS VarInt, which is additive and lands on main.

Public API: breaks moq-net and @moq/net (see the children). Wire: none.

Closes #2907
Closes #2822
Closes #2835

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 13 commits September 28, 2026 19:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VarInt is now the only integer with Encode/Decode, and it holds the full
u64 range. Messages read from a slice-based Decoder and write to a
Vec-backed Encoder instead of generic Buf/BufMut traits implemented on
u64, usize, bool, String, Option and Vec. Parameters are Vec-backed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split the varint codec per form with fixed-size reads and writes, and
reserve a message's size prefix ahead of its body so a small body never
moves. Delete the finished varint-codec quest and move the questline's
varint text to the full 64-bit range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Varint is a wire encoding, not a type. Encoder::varint and Decoder::varint
take and return u64, the stream Reader/Writer gain varint methods, and
moq_net::varint exposes MAX_QUIC plus the QUIC Buf helpers other crates use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropping the VarInt newtype flipped LLVM's inlining of Decoder::varint:
the call stayed out of line with its Result going through memory, doubling
a varint in a tight loop. Force it inline off wasm32 (size-optimized there),
and read the QUIC tag with an if-chain instead of a jump table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also removes a stray blank line under translator.md's Required heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated and others added 2 commits September 29, 2026 11:24
refactor(net)!: concrete u64 varint codec for rs2ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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