Skip to main content

Module codegen

Module codegen 

Source
Expand description

Protocol code generation — TypeScript types and protocol descriptors.

Reads a ProtocolManifest and emits:

  • TypeScript interfaces for commands, queries, events, and DTOs
  • Protocol descriptors for adapter generation

This module is the bridge between Rust protocol definitions and the generated artifacts that TypeScript consumers and runtime adapters use.

Structs§

ProtocolDescriptor
A protocol descriptor for a command, query, or event.
ProtocolDescriptorSet
A complete set of protocol descriptors for a project.
SurfaceDescriptorSet
A per-surface descriptor group.

Enums§

HttpMethod
HTTP method for remote adapter routing.

Functions§

generate_all_surface_typescripts
Generate one TypeScript module per surface in the manifest.
generate_descriptors
Generate protocol descriptors from a manifest.
generate_typescript
Generate a complete TypeScript module from a protocol manifest.
generate_typescript_for_surface
Generate a TypeScript module containing only the items that belong to surface.
rust_type_to_ts
Map a Rust type string (from manifest ty field) to a TypeScript type.