Summary
Achieve full self-hosting: 95%+ of the Gradient compiler written in Gradient, with a minimal Rust kernel providing only critical primitives.
Vision
┌─────────────────────────────────────┐
│ RUST KERNEL (~2,000 lines) │
│ - String primitives │
│ - File I/O │
│ - Memory allocation │
│ - Codegen backend │
└─────────────────────────────────────┘
↓ FFI
┌─────────────────────────────────────┐
│ GRADIENT COMPILER (~15,000 lines) │
│ - Lexer │
│ - Parser │
│ - Type Checker │
│ - Queryable API │
│ - LSP Server │
│ - IR Builder │
│ - Codegen orchestration │
└─────────────────────────────────────┘
Why This Matters
- Dogfooding: Agents develop Gradient in Gradient
- Agent-optimized: Queryable API written in agent-friendly language
- Virtuous cycle: Better tools → faster development → better tools
- Portability: Minimal kernel = easy to port to new platforms
Phases
| Phase |
Issue |
Description |
Effort |
Status |
| 0 |
#118 |
String Primitives (CRITICAL) |
1 day |
🔴 Not started |
| 1 |
#119 |
Lexer |
3 days |
⏳ Blocked on #118 |
| 2 |
#120 |
Parser |
5 days |
⏳ Blocked on #119 |
| 3 |
#121 |
Type Checker |
7 days |
⏳ Blocked on #120 |
| 4 |
#122 |
Queryable API in Gradient |
5 days |
⏳ Blocked on #121 |
| 5 |
#123 |
LSP in Gradient |
7 days |
⏳ Blocked on #122 |
| 6 |
#124 |
IR Builder |
5 days |
⏳ Blocked on #123 |
| 7 |
#125 |
Codegen |
5 days |
⏳ Blocked on #124 |
| Total |
|
|
38 days |
|
Current State
Phase 3 COMPLETE: Type definitions and API signatures in self-hosted code (~4,077 lines)
Ready to start: Phase 0 (String primitives in Rust kernel)
Critical Path
The phases MUST be completed in order. Each phase blocks the next.
Definition of Done
Resources
- Design doc:
SELF_HOSTING_STRATEGY.md
- Phase 3 complete: 10 compiler modules type-check
Labels
epic, self-hosting, roadmap
This is the primary strategic initiative for the Gradient project.
Summary
Achieve full self-hosting: 95%+ of the Gradient compiler written in Gradient, with a minimal Rust kernel providing only critical primitives.
Vision
Why This Matters
Phases
Current State
Phase 3 COMPLETE: Type definitions and API signatures in self-hosted code (~4,077 lines)
Ready to start: Phase 0 (String primitives in Rust kernel)
Critical Path
The phases MUST be completed in order. Each phase blocks the next.
Definition of Done
Resources
SELF_HOSTING_STRATEGY.mdLabels
epic,self-hosting,roadmapThis is the primary strategic initiative for the Gradient project.