Expand description
TypeScript code generation for vox services.
This module generates TypeScript client and server code from service definitions. The generated code includes:
- Type definitions for all named types (structs, enums)
- Client interface and implementation for making RPC calls
- Handler interface for implementing the service
- A Dispatcher class that routes calls to handler methods
- A service descriptor for runtime schema-driven encode/decode
Re-exports§
pub use phon::generate_phon_service;pub use client::generate_client;pub use http_client::generate_http_client;pub use schema::generate_descriptor;pub use schema::generate_send_schema_table;pub use server::generate_server;pub use types::collect_named_types;pub use types::generate_named_types;
Modules§
- client
- TypeScript client generation.
- http_
client - TypeScript HTTP client generation.
- phon
- Per-service phon schema emission for the TypeScript runtime.
- schema
- TypeScript generation for canonical service schema tables and descriptors.
- server
- TypeScript server/handler generation.
- types
- TypeScript type generation and collection.
- wire
- Generate TypeScript wire protocol definitions.
Structs§
Functions§
- generate_
method_ ids - Generate method IDs as a TypeScript constant record.
- generate_
phon_ handshake - Generate the phon
HandshakeMessagemodule for vox-core: the handshake message types + registry +schemaId, plushandshakeSchemaClosure(the self-describing schema-closure bytes to prepend when sending a handshake message). The handshake is phon self-describing — each message carries its own schema closure. - generate_
phon_ wire - Generate the phon
Messagewire module for@bearcove/vox-wire: the envelope type declarations, the self-describing schema-bytes, a readyregistry, and theschemaIdconstants — produced by delegating tophon-codegen. vox-wire’s codec decodes/encodes the envelope against this registry via@bearcove/phon-engine. - generate_
service - Generate a complete TypeScript module for a service.
- generate_
service_ with_ options