Skip to content

Commit fe9d731

Browse files
committed
feat(truapi-codegen): emit Rust dispatcher, wire table, and host callbacks
Extends the rustdoc-JSON code generator to emit the Rust dispatcher and wire table consumed by truapi-server, plus the TS host-callbacks adapter. Golden tests pin the emitted shapes.
1 parent b7c0a12 commit fe9d731

20 files changed

Lines changed: 8195 additions & 74 deletions

Cargo.lock

Lines changed: 226 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/packages/truapi/src/scale.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ export function TaggedUnion<O extends TaggedUnionCodecs>(
132132
* channel. Encoding always emits `Domain`; decoding returns the inner domain
133133
* value and throws for framework-level failures that have no public `D` shape.
134134
*/
135+
export type CallErrorValue<D> = D;
136+
135137
export function CallError<D>(domain: Codec<D>): Codec<D> {
136138
type WireCallError =
137139
| { tag: "Domain"; value: D }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Mismatch dumps written by tests/golden_rust_emit.rs for local inspection.
2+
tests/golden/*.actual

0 commit comments

Comments
 (0)