pub struct SwiftConfig {Show 16 fields
pub module_name: Option<String>,
pub package_name: Option<String>,
pub swift_bridge_version: Option<String>,
pub min_macos_version: Option<String>,
pub min_ios_version: Option<String>,
pub features: Option<Vec<String>>,
pub serde_rename_all: Option<String>,
pub rename_fields: HashMap<String, String>,
pub exclude_functions: Vec<String>,
pub exclude_types: Vec<String>,
pub exclude_fields: Vec<String>,
pub run_wrapper: Option<String>,
pub extra_lint_paths: Vec<String>,
pub core_crate_override: Option<String>,
pub exclude_extra_dependencies: Vec<String>,
pub client_constructor_body: HashMap<String, String>,
}Fields§
§module_name: Option<String>Swift module name (e.g. "MyLibrary"). Defaults to PascalCase of the crate name.
package_name: Option<String>Swift package name. Defaults to the module name.
swift_bridge_version: Option<String>swift-bridge version. Defaults to template_versions::cargo::SWIFT_BRIDGE when unset.
min_macos_version: Option<String>Minimum macOS deployment target. Defaults to template_versions::toolchain::SWIFT_MIN_MACOS when unset.
min_ios_version: Option<String>Minimum iOS deployment target. Defaults to template_versions::toolchain::SWIFT_MIN_IOS when unset.
features: Option<Vec<String>>Cargo features to enable on the binding crate.
serde_rename_all: Option<String>Override the serde rename_all strategy for JSON field names (e.g. “camelCase”, “snake_case”).
rename_fields: HashMap<String, String>Per-field name remapping. Key is TypeName.field_name, value is the
desired binding field name. Applied after automatic keyword escaping.
exclude_functions: Vec<String>Functions to exclude from Swift binding generation.
exclude_types: Vec<String>Types to exclude from Swift binding generation.
exclude_fields: Vec<String>Fields to exclude from Swift binding generation.
Format: "TypeName.field_name".
run_wrapper: Option<String>Prefix wrapper for default tool invocations.
extra_lint_paths: Vec<String>Extra paths to append to default lint commands.
core_crate_override: Option<String>Override the core Cargo dependency name and path for the Swift binding crate.
When set, the binding Cargo.toml depends on this crate (resolved as
../../../crates/<override>) instead of the umbrella [crate.name].
Defaults to unset.
exclude_extra_dependencies: Vec<String>Keys to subtract from the merged extra_dependencies set for this
language only.
client_constructor_body: HashMap<String, String>Override the auto-generated create_<type>(api_key, base_url) constructor
body for opaque client types that expose methods. When set, the swift backend
emits this snippet verbatim as the function body (no implicit Ok(...)).
Use this when the source crate’s constructor signature differs from the
default Type::new(api_key, base_url) shape — e.g. liter-llm uses
DefaultClient::new(ClientConfig, Option<&str>) and needs to build a
ClientConfig from the bridge inputs first.
The snippet is parameterised by {type_name} (the wrapper newtype name)
and runs in a function body with api_key: String and base_url: Option<String>
already in scope. It must return Result<{type_name}, String>.
Trait Implementations§
Source§impl Clone for SwiftConfig
impl Clone for SwiftConfig
Source§fn clone(&self) -> SwiftConfig
fn clone(&self) -> SwiftConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more