pub struct GleamConfig {
pub app_name: Option<String>,
pub nif_module: 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 run_wrapper: Option<String>,
pub extra_lint_paths: Vec<String>,
pub element_constructors: Vec<GleamElementConstructor>,
pub json_object_wrapper: Option<String>,
}Fields§
§app_name: Option<String>§nif_module: Option<String>Erlang atom name for @external(erlang, “
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.
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.
exclude_functions: Vec<String>Functions to exclude from Gleam binding generation.
exclude_types: Vec<String>Types to exclude from Gleam 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.
element_constructors: Vec<GleamElementConstructor>Per-element_type Gleam record-constructor recipes used by the e2e
generator when emitting json_object arg literals. Each entry maps a
fixture-side element_type string (e.g. "BatchFileItem") to a
structured constructor description that the codegen interpolates per
JSON-array item. Without an entry the codegen falls back to the
json_object_wrapper (or a plain json_to_gleam).
Example:
[[crates.gleam.element_constructors]]
element_type = "BatchFileItem"
constructor = "kreuzberg.BatchFileItem"
[[crates.gleam.element_constructors.fields]]
gleam_field = "path"
kind = "file_path"
json_field = "path"
[[crates.gleam.element_constructors.fields]]
gleam_field = "config"
kind = "literal"
value = "option.None"json_object_wrapper: Option<String>Optional Gleam expression template used to wrap json_object arg
values when no element_type recipe matches. The placeholder
{json} is replaced with a Gleam string literal containing the JSON
form of the arg value, allowing the downstream’s Gleam binding to do
its own parsing.
Example:
[crates.gleam]
json_object_wrapper = "kreuzberg.config_from_json_string({json})"When None, the codegen emits {json} verbatim (a plain Gleam
string), matching the iter15 default.
Trait Implementations§
Source§impl Clone for GleamConfig
impl Clone for GleamConfig
Source§fn clone(&self) -> GleamConfig
fn clone(&self) -> GleamConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more