Feature Checklist
Implemented Features
Core Language:
- Comments (single-line
//, multi-line/* */, doc///and//!) - Visibility modifiers (
pub) - Use statements (Rust-style imports with
::and{})
Type System:
- Primitive types (
String,I32,I64,F32,F64,Boolean,Path,Regex,Never) - Array types (
[Type]) - Dictionary types (
[KeyType: ValueType]) - Optional types (
Type?) - Tuple types (named-only)
- Generic types (
Type<T>,Type<T: Constraint>) - Closure types (
T -> U,T, U -> V,() -> T) - Type inference
Definitions:
- Struct definitions
- Inherent impl blocks (methods)
- Trait definitions (field requirements and method signatures)
impl Trait for Typeconformance blocks- Enum definitions (with associated data, generics)
extern fndeclarations (with"C"/"system"ABI selection)extern implblocks (includingextern impl String,extern impl I32, etc. on primitive receivers)- Function definitions with optional overloading
- Parameter conventions (
mut,sink) on regular and closure params - Default parameter values (
fn f(x: I32 = 0)); arity checks treat defaulted params as optional - Codegen attribute prefixes (
inline,no_inline,cold) - Let bindings (file-level, with
pub,mut) - Generic parameters on structs, traits, enums
Expressions:
- All literals (string, multi-line string, number with suffix, boolean, nil, path, regex, array, dictionary)
- Binary operators (arithmetic, comparison, equality, logical, concatenation)
- Field access (including nested)
- Destructuring (arrays, structs, enums)
- Struct and enum instantiation
- Closure expressions
- Range operator (
..) - Correct operator precedence
Control Flow:
- For expressions (array iteration)
- If expressions (with boolean and optional unwrapping)
- Match expressions (exhaustive pattern matching)
Generics:
- Generic type parameters with constraints
- Generic structs, traits, enums
- Generic instantiation with type arguments and inference
- Nested generics, generic arity validation
- Monomorphisation pass (
MonomorphisePass) clones definitions per unique argument tuple and devirtualises trait calls on concrete receivers - Cross-module monomorphisation: imported items (functions, impls,
pub
lets, generic types) are inlined into the entry module under qualified names so backends see one self-containedIrModule
Module System:
- Use statements and module path resolution
- Visibility control
- Nested modules (
modblocks)
Validation (semantic analysis):
- Module resolution
- Symbol table building
- Type resolution
- Expression validation
- Trait conformance validation
- Cycle detection
- Function overload resolution
Source Spans (for tooling / source maps / DWARF):
- Every
IrExpr, definition, andIrBlockStatementcarries anIrSpan { start, end, file: FileId } IrModule.file_tableresolvesFileIdto aPathBuf; cross-module clones have theirFileIds remapped onto the entry module's table
Serde:
format_versiononFile- Full serialize/deserialize round-trip for all public AST types
#[non_exhaustive]on public enums and structs
Not Yet Implemented
- Incremental compilation (salsa)
- Code formatter
- REPL mode
- VSCode extension (full integration)
- Evaluation/expansion stage (runtime)