pub struct PythonConfig {Show 15 fields
pub module_name: Option<String>,
pub async_runtime: Option<String>,
pub stubs: Option<StubsConfig>,
pub pip_name: Option<String>,
pub features: Option<Vec<String>>,
pub serde_rename_all: Option<String>,
pub capsule_types: HashMap<String, String>,
pub release_gil: bool,
pub exclude_functions: Vec<String>,
pub exclude_types: Vec<String>,
pub extra_dependencies: HashMap<String, Value>,
pub scaffold_output: Option<PathBuf>,
pub rename_fields: HashMap<String, String>,
pub run_wrapper: Option<String>,
pub extra_lint_paths: Vec<String>,
}Fields§
§module_name: Option<String>§async_runtime: Option<String>§stubs: Option<StubsConfig>§pip_name: Option<String>PyPI package name (e.g. "html-to-markdown"). Used as the [project] name in
pyproject.toml and to derive the python-packages list for maturin.
Defaults to the crate name.
features: Option<Vec<String>>Per-language feature override. When set, these features are used instead of
[crate] features for this language’s binding crate.
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.
capsule_types: HashMap<String, String>Map of type name -> PyCapsule name for raw pointer wrapping. When a function returns one of these types, alef generates PyCapsule_New instead of Arc wrapping.
release_gil: boolWhen true, wrap blocking function bodies in py.allow_threads() to release the GIL.
exclude_functions: Vec<String>Functions to exclude from Python binding generation.
exclude_types: Vec<String>Types to exclude from Python binding generation.
extra_dependencies: HashMap<String, Value>Additional Cargo dependencies for this language’s binding crate only.
scaffold_output: Option<PathBuf>Override the scaffold output directory for this language’s Cargo.toml and package files.
rename_fields: HashMap<String, String>Per-field name remapping for this language. Key is TypeName.field_name (e.g.
"LayoutDetection.class"), value is the desired binding field name. Applied after
automatic keyword escaping, so an explicit entry takes priority.
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.).
E.g., run_wrapper = "uv run --no-sync" turns ruff format packages/python into
uv run --no-sync ruff format packages/python.
extra_lint_paths: Vec<String>Extra paths to append to default lint commands (format, check, typecheck). Space-separated paths are appended to the command.
Trait Implementations§
Source§impl Clone for PythonConfig
impl Clone for PythonConfig
Source§fn clone(&self) -> PythonConfig
fn clone(&self) -> PythonConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more