Expand description
rune compile back-end — background compilation and transparent hot-swap.
Architecture:
- CompileQueue: background thread pool for compilation jobs
- ArtifactCache: source-hash → compiled artifact mapping
- TierRouter: per-call-site tier (interpret | compile | compiled)
- hot-swap: when compile finishes, next call uses compiled path
The interpreter is always the fallback. Compilation is opportunistic. Instant start is always preserved — compilation never blocks execution.
Structs§
- Artifact
Cache - The artifact cache — maps source hash to compiled artifact.
- Call
Counter - Call counter per formula hash — tracks hot paths.
- Compiled
Artifact - A compiled artifact — the result of optimizing a Nox formula. In M6, this is the same Noun (no actual optimization yet). In future milestones: TIR-optimized .nox bytecode.
- Tier
Router - TierRouter — makes the call-tier decision.
- Tier
Stats - Stats snapshot returned by
TierRouter::stats.
Enums§
- Tier
- Per-callsite execution tier.
Functions§
- compile_
formula - Compile a formula. In M6 this is the trident path stub. Returns an artifact immediately (background thread in M8+).
- formula_
hash - A simple formula hash — placeholder until hemera lands in M2.
- try_
trident_ compile - Attempt to compile a pure rune formula through trident. Returns Some(artifact) if compilation succeeded, None if formula contains dynamic forms (hint/host/eval) that trident cannot accept.