pub struct WorkspaceConfig {Show 17 fields
pub alef_version: Option<String>,
pub languages: Vec<Language>,
pub tools: ToolsConfig,
pub dto: DtoConfig,
pub format: FormatConfig,
pub format_overrides: HashMap<String, FormatConfig>,
pub generate: GenerateConfig,
pub generate_overrides: HashMap<String, GenerateConfig>,
pub output_template: OutputTemplate,
pub lint: HashMap<String, LintConfig>,
pub test: HashMap<String, TestConfig>,
pub setup: HashMap<String, SetupConfig>,
pub update: HashMap<String, UpdateConfig>,
pub clean: HashMap<String, CleanConfig>,
pub build_commands: HashMap<String, BuildCommandConfig>,
pub opaque_types: HashMap<String, String>,
pub sync: Option<SyncConfig>,
}Expand description
Workspace-level configuration shared across all [[crates]] entries.
Every field is optional; an empty [workspace] section is valid and means
every crate uses Alef’s built-in defaults (or its own per-crate values).
Resolution rule (highest priority first):
- Per-crate value on
[[crates]]. - Workspace default on
[workspace]. - Built-in default (compiled into Alef).
Fields§
§alef_version: Option<String>Pinned alef CLI version (e.g. "0.13.0"). Used by the install-alef
helper to install the exact version this workspace expects.
In the legacy single-crate schema this lived at version at the top
level. The new schema renames it to [workspace] alef_version so it
can never collide with any per-crate version field.
languages: Vec<Language>Default list of target languages for crates that do not specify their
own. A per-crate languages array overrides this entirely.
tools: ToolsConfigGlobal package-manager and dev-tool preferences. Inherited by every crate; cannot be overridden per-crate today.
dto: DtoConfigDefault DTO/type generation styles per language. A per-crate [crates.dto]
table replaces this wholesale (no field-level merge).
format: FormatConfigDefault post-generation formatting flags. A per-crate value replaces this wholesale.
format_overrides: HashMap<String, FormatConfig>Default per-language formatting overrides (e.g., disable mix format
for elixir). Merged with per-crate format_overrides by language key:
per-crate keys win wholesale; missing keys fall through to this map.
Note: there is no field-level merge inside a single FormatConfig.
generate: GenerateConfigDefault generation-pass flags (which passes alef runs).
generate_overrides: HashMap<String, GenerateConfig>Default per-language generation flag overrides. Merged with per-crate
generate_overrides by language key: per-crate keys win wholesale;
missing keys fall through to this map.
output_template: OutputTemplatePer-language output path templates with {crate} and {lang} placeholders.
A per-crate explicit [crates.output] path always wins over the template.
lint: HashMap<String, LintConfig>Default lint pipeline keyed by language code ("python", "node", …).
Merged field-wise with per-crate [crates.lint.<lang>].
test: HashMap<String, TestConfig>Default test pipeline keyed by language code.
setup: HashMap<String, SetupConfig>Default setup pipeline keyed by language code.
update: HashMap<String, UpdateConfig>Default update pipeline keyed by language code.
clean: HashMap<String, CleanConfig>Default clean pipeline keyed by language code.
build_commands: HashMap<String, BuildCommandConfig>Default build pipeline keyed by language code.
opaque_types: HashMap<String, String>Workspace-wide opaque types — types from external crates that alef can’t extract. Map of type name → fully-qualified Rust path. These get opaque wrapper structs across all language backends, in every crate that references them.
sync: Option<SyncConfig>Workspace-wide version sync rules. A per-crate publish step still runs independently per crate; sync rules in this section apply globally.
Trait Implementations§
Source§impl Clone for WorkspaceConfig
impl Clone for WorkspaceConfig
Source§fn clone(&self) -> WorkspaceConfig
fn clone(&self) -> WorkspaceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more