How leandros/ferrunix works
Main Components
a) Core Components:
• ferrunix-core: The main engine of the DI framework
• ferrunix-macros: The derive macro implementation
• ferrunix: The main public API crate
b) Supporting Components:
• Documentation system (book)
• Examples
• Testing infrastructure
• Build and CI tools (xtask)
Public API Layer
• Entry point through the main ferrunix crate
• Expose high-level interfaces for users
Macro Processing Layer
• Custom derive macros for dependency injection
• Attribute processing
• Code generation facilities
Core Implementation Layer
• Registry management
• Dependency resolution
• Lifecycle management
• Error handling
• Async support
Use a top-down approach with three main sections
┌─────────────────────────────────────┐
• Public API Layer │
• (ferrunix) │
• ┘
• ↑
┌─────────────────────────────────────┐
• Macro Processing Layer │
• (ferrunix-macros) │
• ┘
• ↑
┌─────────────────────────────────────┐
• Core Implementation │
• (ferrunix-core) │
• ┘
For each layer, include the following details
Core Implementation Layer:
• Object Builder (Sync/Async)
• Dependency Resolution
• Cycle Detection
• Registration Management
• Type System Integration
Macro Processing Layer:
• Attribute Processing
• Derive Macro Implementation
• Code Generation
• Injection Logic
Public API Layer:
• Registry Interface
• Builder Patterns
• Error Handling
• Public Traits
• Data flow direction
• Type information flow
Specific features
• Async support paths
• Error propagation channels
• Registration flows
• Dependency resolution paths
Important Considerations:
How the three main crates interact
• ferrunix → ferrunix-core (runtime dependency)
• ferrunix → ferrunix-macros (compile-time dependency)
• ferrunix-macros → ferrunix-core (type information only)
Subsystems from ferrunix-core
• Registry management
• Object lifecycle
• Dependency resolution
• Error handling
Extension points
• Custom derive implementations
• Trait implementations
• Builder customization