Skip to content

Add dev config support with local project overrides #15

Description

@brooksmtownsend

Description

The wash configuration system currently supports build, templates, and wit configurations, but lacks a dedicated dev configuration section. This would be useful for development-specific settings that can be overridden in local project configurations.

Location

crates/wash/src/config.rs:45 in the main Config struct

Current Behavior

The Config struct includes:

  • build: Build configuration for different project types
  • templates: Template configuration for new project creation
  • wit: WIT dependency management configuration

But has no dedicated development configuration section.

Proposed Solution

Add a dev field to the Config struct, similar to existing fields:

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct Config {
    // ... existing fields ...
    
    /// Development configuration (default: empty/optional)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dev: Option<DevConfig>,
}

Example Use Cases

The dev config could include settings for:

  • Runtime configuration: Default wasmtime settings, resource limits
  • HTTP ports: Default ports for development servers
  • Watch patterns: File patterns to watch for changes
  • Plugin settings: Development-specific plugin configurations
  • Logging levels: Default log levels for dev mode

Context

This follows the established pattern of hierarchical configuration where:

  • Global config: ~/.config/wash/config.json
  • Local project config: .wash/config.json (can override global settings)

This would improve the development experience by allowing both global defaults and project-specific overrides for development settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions