Skip to main content

Module swift

Module swift 

Source
Expand description

Swift code generation for roam 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 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.
encode
Swift encoding expression generation.
schema
Swift schema generation for runtime channel binding.
server
Swift server/handler generation.
types
Swift type generation and collection.
wire
Swift wire type code generation.

Enums§

SwiftBindings
Controls which Swift bindings are generated for a service.

Functions§

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.