pub struct DartConfig {Show 17 fields
pub pubspec_name: Option<String>,
pub lib_name: Option<String>,
pub package_name: Option<String>,
pub style: DartStyle,
pub frb_version: Option<String>,
pub features: Option<Vec<String>>,
pub extra_dependencies: HashMap<String, Value>,
pub serde_rename_all: Option<String>,
pub rename_fields: HashMap<String, String>,
pub exclude_functions: Vec<String>,
pub exclude_types: 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 stub_methods: Vec<String>,
pub target_dep_overrides: Vec<DartTargetDepOverride>,
}Fields§
§pubspec_name: Option<String>Dart pub.dev package name (e.g. "my_package"). Used as the name in
pubspec.yaml. Defaults to a snake_case derivation of the crate name.
lib_name: Option<String>Dart library name (the library declaration). Defaults to the pubspec name.
package_name: Option<String>Dart package name override (e.g. for pub.dev scoped packages).
style: DartStyleBridging style. "frb" (default) uses flutter_rust_bridge; "ffi" emits
raw dart:ffi source over the cbindgen C library.
frb_version: Option<String>flutter_rust_bridge version to pin in generated pubspec.yaml.
Defaults to template_versions::cargo::FLUTTER_RUST_BRIDGE when unset.
features: Option<Vec<String>>Cargo features to enable on the binding crate.
extra_dependencies: HashMap<String, Value>Additional Cargo dependencies for the generated Dart Rust bridge 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 Dart binding generation.
exclude_types: Vec<String>Types to exclude from Dart binding generation.
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 Dart 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.
stub_methods: Vec<String>Method names whose Rust bridge body should be emitted as unimplemented!().
Use this when a function’s FFI signature (e.g. nested tuples containing
Vec<u8>) cannot be represented across the FRB bridge at all. Consumers must
list the method names explicitly — this field has no built-in defaults so the
knob is library-agnostic.
Example (alef.toml):
[crates.dart]
stub_methods = ["batch_extract_bytes", "batch_extract_bytes_sync"]target_dep_overrides: Vec<DartTargetDepOverride>Per-target Cargo dependency overrides for the binding crate.
When set, the emitted Cargo.toml wraps the base core dependency in a
[target.'cfg(not(<cfg>))'.dependencies] section and adds a matching
[target.'cfg(<cfg>)'.dependencies] block using override_features
(and default_features = false when override_default_features = false).
Required when the binding has to swap the feature set on a specific
target triple, e.g. Android x86_64 dropping ORT-dependent features.
Example (alef.toml):
[[crates.dart.target_dep_overrides]]
cfg = "all(target_os = \"android\", target_arch = \"x86_64\")"
features = ["android-target"]
default_features = falseTrait Implementations§
Source§impl Clone for DartConfig
impl Clone for DartConfig
Source§fn clone(&self) -> DartConfig
fn clone(&self) -> DartConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more