Expand description
Swift code generation for vox services.
This module generates Swift client and server code from service definitions. The generated code includes:
- Type definitions for all named types (structs, enums)
- Caller protocol and client implementation for making RPC calls
- Handler protocol for implementing services
- Dispatcher for routing incoming calls
- Encoding/decoding logic for all types
- Runtime schema information for channel binding
Re-exports§
pub use client::generate_client;pub use descriptor::generate_service_value_descriptors;pub use descriptor::generate_value_descriptors;pub use encode::generate_named_type_encode_fns;pub use schema::generate_schemas;pub use server::generate_server;pub use types::collect_named_types;pub use types::generate_named_types;
Modules§
- client
- Swift client generation.
- decode
- Swift decoding statement generation.
- descriptor
- Swift value descriptor generation.
- encode
- Swift encoding expression/statement generation.
- schema
- Swift schema generation for wire schema exchange.
- server
- Swift server/handler generation.
- types
- Swift type generation and collection.
- wire
- Swift wire type code generation.
Enums§
- Swift
Bindings - Controls which Swift bindings are generated for a service.
Functions§
- generate_
common_ types - Generate a Swift module containing only the named-type declarations + encoders referenced by the given services, deduplicated by type name. Each type is emitted exactly once even if multiple services reference it.
- generate_
method_ ids - Generate method IDs as a Swift enum.
- generate_
service - Generate a complete Swift module for a service.
- generate_
service_ with_ bindings - Generate a Swift module for a service with explicit client/server selection.
- generate_
service_ without_ types - Like
generate_service_with_bindings, but emits no named-type declarations or named-type encoders. Use this together withgenerate_common_typeswhen several services share types and you want them in a single “common” file rather than duplicated in every per-service file.