RFC-003: Version Planning
Rejection Date: 2026-06-01
⚠️ Reason for Rejection
This RFC does not conform to RFC specifications and has been rejected.
Issue Analysis
| Problem | Description |
|---|---|
| Wrong Document Type | RFC is a decision document about "why this design", but this article is a project management document about "where we are, where we're going" |
| Lacking Design Decisions | No trade-off analysis for technical choices, no comparison of alternative solutions, no design rationale |
| Over-planning | Planned 9 versions (v0.1-v1.0), but only completed 1.5; v0.3 and beyond are all speculation |
| High Maintenance Cost | Success indicators table has 50 states, hard to maintain |
| Version Number Chaos | Skipped v0.8, no explanation provided |
Correct Document Type
This document should be managed as a Roadmap, not an RFC. Roadmaps record facts and short-term plans, while RFCs record design decisions.
The following is the original content, kept for reference.
Summary
Version release plan for YaoXiang, a roadmap from v0.1 to v1.0.
Core Goals:
- Bytecode Compilation: Support REPL and incremental compilation
- Bootstrap: Use YaoXiang to write the YaoXiang compiler
- AOT Compilation: Compile bytecode to native machine code
1. Motivation
Why is version planning needed?
- Project Management: Decompose goals into executable milestones
- User Expectations: Let users understand the development stage of the language
- Resource Allocation: Clarify focus areas for each phase
- Risk Control: Identify issues early and adjust direction
Core Design Decisions
- Bytecode First: Implement interpreter execution first, then consider AOT
- Incremental Delivery: Each version has usable functionality
- Backward Compatibility: API may change before v1.0, but with advance notice
- Bootstrap Verification: Prove the language's expressiveness through self-hosting
- Performance Tiering: Get it running first, optimize later
2. Component Status (Phase)
| Phase | Module | Status | Location | Last Updated |
|---|---|---|---|---|
| P1 | Lexer | ✅ Completed | src/frontend/lexer/ | 2025-01-23 |
| P2 | Type Checker | ✅ Completed | src/frontend/typecheck/ | 2025-01-23 |
| P3 | Bytecode Gen | ✅ Completed | src/middle/codegen/ | 2025-01-25 |
| P4 | Virtual Machine | ✅ Completed | src/middle/ | 2025-01-25 |
| P4.1 | Task System | ✅ Completed | src/backends/runtime/task.rs | 2025-01-23 |
| P4.2 | DAG Scheduler | 🔶 Design Done | .claude/plan/flow-scheduler-implementation.md | 2026-01-04 |
| P5 | Standard Library | ⚠️ Partial | src/std/ | 2025-01-23 |
| P6 | TUI REPL | ✅ Completed | src/backends/dev/repl/ | 2025-01-24 |
| P7 | Generics System | ✅ Completed | docs/design/rfc/011-generic-type-system.md | 2025-01-25 |
Core Achievements:
- ✅ Complete compiler frontend implementation (P1-P2)
- ✅ Bytecode generation and VM completed (P3-P4)
- ✅ Basic task system completed (P4.1)
- ✅ TUI REPL development completed (P6)
- ✅ Generics system design completed (P7)
Next Priority: Implement FlowScheduler → Complete standard library (P5) → v0.1 release
3. Version Roadmap
v0.1: Runnable Milestone ✅
Status: Basic completion (2025-01-25)
Completed:
- ✅ Lexing, parsing, and type checking complete
- ✅ Bytecode generation available
- ✅ VM can interpret and execute basic programs
- ✅ Basic print function
- ✅ TUI REPL complete
- ✅ Basic task system (Task/Scheduler)
$ yaoxiang run hello.yx
Hello, YaoXiang!Technical Highlights:
- Three-tier runtime architecture design complete
- Task system fully implemented
- Modern TUI REPL interface
- Unified type syntax + generics system design
Not Included: Complete DAG scheduling (basic scheduler already implemented)
v0.2: FlowScheduler 🚧
Goal: Implement a complete dependency-aware scheduler
- ✅ Design document complete
- 🔶 Implementation in progress
- [ ] DAG node and graph implementation
- [ ] Work stealing algorithm
- [ ] libuv IO scheduling engine
- [ ] Lazy evaluation strategy
- [ ] spawn syntax support
Technical Focus:
- FlowScheduler architecture implementation
- Industrial-grade IO scheduling (libuv)
- Zero-cost abstraction
v0.3: Concurrency Preview 📋
Goal: Support basic concurrency
- DAG task dependency graph
- Basic scheduler
- spawn concurrency
v0.4: Generics System 📋
Goal: Complete generics capabilities
- [ ] RFC-011 Phase 1: Basic generics
- [ ] RFC-011 Phase 2: Type constraints
- [ ] RFC-011 Phase 3: Associated types
- [ ] RFC-011 Phase 4: Const generics
- [ ] RFC-011 Phase 5: Conditional types
Technical Focus:
- Dead code elimination
- Zero-cost abstraction
- Function overloading + inlining optimization
v0.5: Standard Library Enhancement 📋
Goal: Usability improvements
- IO, dictionary, network modules
- Toolchain (fmt, basic LSP)
- Performance optimization
v0.6: Error Handling System 📋
Goal: Complete error handling
- [ ] RFC-001 implementation
- [ ] Result type system
- [ ] Error graph visualization
- [ ] DAG error propagation
v0.7: Stable Version 📋
Goal: API approaching stability
- Complete documentation
- Toolchain refinement
- Edge case fixes
v0.9: Bootstrap Start 📋
Goal: Rewrite core modules in YaoXiang
- Lexer → Parser → TypeChecker → Codegen progressive replacement
- Cross-validation: results from both compilers match
v1.0: Production Ready 📋
Goal: Stable release
- Complete bootstrap
- AOT compilation (LLVM backend)
- Production ready
4. Three-Layer Compilation Strategy Design
| Layer | Version | Input | Output | Description |
|---|---|---|---|---|
| L1: Bytecode | v0.1+ | Source (.yx) | Bytecode (.yxb) | VM interpreted |
| L2: Bootstrap | v0.9+ | YaoXiang src | Bytecode | Self-compilation |
| L3: AOT | v1.0+ | Source/Bytecode | Native code | Native performance |
Rationale for Bytecode First:
- REPL Support: Compile input code on-the-fly, interactive development
- Incremental Compilation: Modifying a single function only recompiles that part
- Platform Independence: .yxb files run cross-platform with platform-specific VM
5. Dependency Strategy
Short-term: Call Rust libraries to reuse crates.io (Cargo parasitism)
Current Dependencies:
- Concurrency: parking_lot, crossbeam, rayon
- Data structures: indexmap, hashbrown, smallvec
- Network: tokio
- Serialization: serde, ron
Long-term: Self-built standard library and package manager
6. Toolchain
| Version | Tool | Status |
|---|---|---|
| v0.1 | yaoxiang-cli | ✅ Completed |
| v0.1 | TUI REPL | ✅ Completed |
| v0.2 | yaoxiang-debug | 🚧 Designing |
| v0.3 | yaoxiang-fmt | 📋 Planned |
| v0.3 | yaoxiang-lsp (basic) | 📋 Planned |
| v0.5 | yaoxiang-clippy | 📋 Planned |
| v1.0 | Complete toolchain | 📋 Planned |
7. Success Indicators
| Indicator | v0.1 | v0.2 | v0.3 | v0.5 | v1.0 |
|---|---|---|---|---|---|
| End-to-end run | ✅ | ✅ | ✅ | ✅ | ✅ |
| Basic task system | ✅ | ✅ | ✅ | ✅ | ✅ |
| FlowScheduler | ❌ | 🚧 | ✅ | ✅ | ✅ |
| Concurrency support | ⚠️ | 🚧 | ✅ basic | ✅ full | ✅ |
| Standard library | basic | basic | basic | enhanced | full |
| Generics system | ⚠️ | ⚠️ | 🚧 | ✅ | ✅ |
| TUI REPL | ✅ | ✅ | ✅ | ✅ | ✅ |
| Bootstrap | ❌ | ❌ | ❌ | ❌ | ✅ |
| AOT | ❌ | ❌ | ❌ | ❌ | ✅ |
| Code coverage | 60% | 70% | 80% | 90% | 95% |
Legend:
- ✅ Completed
- 🚧 In Progress
- ⚠️ Partially Complete
- 📋 Planned
8. Open Questions
- [ ] JIT vs AOT timing selection
- [ ] Package manager design
- [ ] Bootstrap module replacement order
- [ ] AOT backend selection (LLVM vs self-developed)
9. Version Release Standards
v0.x Series:
- Functionally complete but may have edge case issues
- API may change
- For learning and experimentation only
v1.0:
- All core features stable
- API frozen
- Suitable for production use
- Complete documentation and tutorials
