Skip to main content

WorkspaceConfig

Struct WorkspaceConfig 

Source
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):

  1. Per-crate value on [[crates]].
  2. Workspace default on [workspace].
  3. 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: ToolsConfig

Global package-manager and dev-tool preferences. Inherited by every crate; cannot be overridden per-crate today.

§dto: DtoConfig

Default DTO/type generation styles per language. A per-crate [crates.dto] table replaces this wholesale (no field-level merge).

§format: FormatConfig

Default 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: GenerateConfig

Default 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: OutputTemplate

Per-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

Source§

fn clone(&self) -> WorkspaceConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WorkspaceConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WorkspaceConfig

Source§

fn default() -> WorkspaceConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for WorkspaceConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for WorkspaceConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,