pub struct WasmConfig {Show 17 fields
pub exclude_functions: Vec<String>,
pub exclude_types: Vec<String>,
pub type_overrides: HashMap<String, String>,
pub features: Option<Vec<String>>,
pub serde_rename_all: Option<String>,
pub type_prefix: Option<String>,
pub exclude_reexports: Vec<String>,
pub env_shims: Vec<String>,
pub extra_dependencies: HashMap<String, Value>,
pub rename_fields: HashMap<String, 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 custom_rust_modules: Vec<String>,
pub exclude_fields: HashMap<String, Vec<String>>,
pub source_crate_remaps: Vec<String>,
}Fields§
§exclude_functions: Vec<String>§exclude_types: Vec<String>§type_overrides: HashMap<String, String>§features: Option<Vec<String>>§serde_rename_all: Option<String>Override the serde rename_all strategy for JSON field names (e.g. “camelCase”, “snake_case”). When set, this takes priority over the IR type-level serde_rename_all.
type_prefix: Option<String>Prefix for generated type names (e.g. “Wasm” produces WasmConversionOptions).
Defaults to "Wasm".
exclude_reexports: Vec<String>Functions to exclude from the public TypeScript re-export (index.ts) while still generating the Rust binding. Use this when a custom module provides a wrapper.
env_shims: Vec<String>Wide-character C functions to shim for WASM external scanner interop.
extra_dependencies: HashMap<String, Value>Additional Cargo dependencies for the WASM binding crate only.
rename_fields: HashMap<String, String>Per-field name remapping for this language. Key is TypeName.field_name, value is the
desired binding field name. Applied after automatic keyword escaping.
run_wrapper: Option<String>Prefix wrapper for default tool invocations. When set, prepends this string to default commands across all pipelines (lint, test, build, etc.).
extra_lint_paths: Vec<String>Extra paths to append to default lint commands (format, check, typecheck).
core_crate_override: Option<String>Override the core Cargo dependency name and path for the WASM binding crate.
When set, the binding Cargo.toml depends on this crate (resolved as
../<override>) instead of the umbrella [crate.name]. Use this to point
the WASM binding at a wasm-safe sub-crate while other languages keep the
facade. Defaults to unset.
exclude_extra_dependencies: Vec<String>Keys to subtract from the merged extra_dependencies set for this
language only. Useful when [crate.extra_dependencies] lists sibling
crates that the WASM target cannot link.
custom_rust_modules: Vec<String>Hand-written Rust modules to declare in the generated lib.rs with pub mod <name>;
and re-export with pub use <name>::*;. Separate from [custom_modules].wasm which
only adds TypeScript export * re-exports. Use this for Rust-side dispatch/glue modules.
exclude_fields: HashMap<String, Vec<String>>Per-type field exclusions for the generated From impls and binding struct.
Key is the type name (e.g. “ServerConfig”), value is a list of field names to skip.
Use when source fields are gated behind #[cfg(not(target_arch = "wasm32"))] and
therefore don’t exist in the wasm32 compilation environment.
source_crate_remaps: Vec<String>Source crate names whose types are re-exported by the core_crate_override
crate. References to <original_crate>::TypeName in generated code are
rewritten to <override_crate>::TypeName. Only meaningful when
core_crate_override is set.
Example: with core_crate_override = "mylib-http", setting
source_crate_remaps = ["mylib-core", "mylib"] rewrites
mylib_core::Method and mylib::Method references to
mylib_http::Method (assumes mylib-http re-exports them via
pub use mylib_core::*).
Trait Implementations§
Source§impl Clone for WasmConfig
impl Clone for WasmConfig
Source§fn clone(&self) -> WasmConfig
fn clone(&self) -> WasmConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more