How simonask/werk works
Main Components Identification
The project is structured as a set of Rust crates, each with distinct responsibilities. The main components to include are:
a) Core Components (Primary Crates):
• werk-cli: Entry point and CLI interface
• werk-runner: Core build system and execution engine
• werk-parser: Language parser and AST handling
• werk-fs: File system operations
• werk-vscode: IDE integration
Component Relationships and Data Flow
Top Level:
[User Input] → [werk-cli] → [werk-runner] → [File System Output]
Detailed Components:
• ┌─────────────┐
• werk-cli │
• ┬───────┘
• ┌───────────────────────┬─▼─┬───────────────────────┐
• ┌──────▼──────┐ ┌──────▼───▼──┐ ┌──────▼──────┐
• werk-parser │◄─────►│ werk-runner │◄────────► │ werk-fs │
• ┘ └────────────┘ └─────────────┘
• ▲
• ┌─────▼──┴────┐
• werk-vscode │
• ┘
Important Subsystems to Detail
For the werk-runner component, show internal modules:
werk-runner
• Runner Core
• Evaluator
• Cache System
• Workspace Manager
• I/O Handling
• Shell Operations
• Child Processes
• Dependency Management
• Outdatedness Checker
• Depfile Handler
Notes for Implementation Details
• The declarative nature of the system
• The separation between parsing and execution
• The file system abstraction layer
• The VS Code integration pathway
Remember to maintain a balance between showing enough detail to understand the system while keeping it clean and readable. Focus on the core architectural decisions that make Werk unique, such as its approach to build system functionality combined with command running capabilities.