How nappa85/symbols works
Main Components
a) Core Components:
• Proc Macro Engine (Central Component)
• Database Connection Layer
• Code Generation Module
• Cache System
• Model Definition Layer
b) Data Flow Components:
• Input Processing (Attribute Macros)
• Database Query System
• Enum Generation
• Method Generation
• Cache Management
┌─ Development Time ─────────────────────────────────────┐
• ┌─ Proc Macro Engine ──────────────────────────────┐ │
• ┌─ Input Processing ─┐ ┌─ Code Generation ┐ │ │
• Attribute Parser │ -> │ - Enum Builder │ │ │
• Type Resolution │ │ - Method Builder │ │ │
• ┬─┘ └────────┬────────┘ │ │
• ┌─ Cache System ─┐ │ ┌─ Database Layer ┐ │ │
• Temp Storage │<┼--->│ - Query Engine │ │ │
• Cache Files │ │ - Connection │ │ │
• ┘ └───────────────┘ │ │
• ┘ │
• ┘
┌─ Runtime ──────────────────────────────────────────┐
• ┌─ Generated Code ────────────────────────────┐ │
• ┌─ Enum Types ─┐ ┌─ Generated Methods ┐│ │
• Variants │ │ - Field Accessors ││ │
• Converters │ │ - Constructors ││ │
• ┘ └──────────────────┘ │ │
• ┘ │
• ┘
Key Relationships
• Attribute Processing → Database Queries
• Database Queries ↔ Cache System
• Code Generation → Output Enum/Methods
• Type Resolution → Method Generation
Important Details
a) Input Flow:
• Attribute macro parameters (#[example::example(...)])
• Table definitions
• Type mappings
b) Processing Flow:
• Cache checking/updating
• Database query execution
• Code generation steps
c) Output Flow:
• Generated enum variants
• Generated methods (const fn)
• Type conversions