feat(runtime): @comline/runtime — the contract layer - #6
Merged
Conversation
First cut of the TypeScript runtime generated bindings will link against
(the counterpart of the Rust comline-runtime crate). MPL-2.0, Node, zero
runtime dependencies.
- contract.ts — RuntimeError, Kind + resolveKind, Call, Envelope,
Outcome, Reply, CallError, the Codec and Dispatch interfaces.
- handshake.ts — Handshake (the fixed 31-byte frame), FNV-1a nameHash,
check(). Byte-compatible with comline-runtime's contract::handshake —
the nameHash reference vectors are cross-checked against the Rust
constants, so a TS peer and a Rust peer generated from one schema
negotiate the same frame.
- codec.ts — JsonCodec (name "json", pairs with Rust format::Json).
Framing (datagram + JSON-RPC), Transport, Client, Server, and a generator
that emits <Proto>Client / dispatcher against this package follow.
CI gains a Node job (npm ci / typecheck / node --test) alongside the
existing cargo one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First cut of the TypeScript runtime that generated bindings will link against — the counterpart of the Rust
comline-runtimecrate. MPL-2.0, Node, zero runtime dependencies.src/contract.tsRuntimeError,Kind+resolveKind,Call,Envelope,Outcome,Reply,CallError, theCodecandDispatchinterfacessrc/handshake.tsHandshake(the fixed 31-byte frame), FNV-1anameHash,check()src/codec.tsJsonCodec(name === "json", pairs with Rustformat::Json)HandshakeandnameHashare byte-compatible withcomline-runtime'scontract::handshake— thenameHashreference vectors in the tests are cross-checked against the Rust FNV-1a constants, so a TS peer and a Rust peer generated from the same schema negotiate the same frame.CI gains a
runtime - Nodejob (npm ci/npm run typecheck/npm test—tsc+node --test) next to the existing cargo one.Next:
Framing(datagram + JSON-RPC),Transport+ an in-memory pair,Client/Server, then the generator emitting<Proto>Client/ dispatcher against this package, thenlibmode.