Initializing compilation loop...

Most developers use programming languages every day.

Few ever see how one works.

Rune was built to change that.

Signature Interactive

The Compiler Journey

Scroll down or select a compiler stage to watch code convert step-by-step from raw text to outputs.

greet.rnRune Code
spell greet(name) {
  write("Hello ", name)
}

greet("explorer")
Console StatusWaiting for execution...
STAGE RESOLUTION:
1. Source Text

The raw program text loaded into memory characters.

spell greet(name) {
write("Hello ", name)
}

greet("explorer")
2. Token Stream

A hand-rolled scanner breaks characters into syntactic tokens.

KEYWORD(spell)IDENT(greet)SYMBOL(()IDENT(name)SYMBOL())SYMBOL({)FN(write)SYMBOL(()STRING("Hello ")SYMBOL(,)IDENT(name)SYMBOL())SYMBOL(})IDENT(greet)SYMBOL(()STRING("explorer")SYMBOL())
3. Abstract Syntax Tree

The recursive parser links tokens into structured expressions.

Program
└─SpellDefinition: greet(name)
└─Param: name
└─BlockStmt
└─WriteStatement: write()
└─Arg: "Hello "
└─Arg: name
└─FunctionCall: greet("explorer")
4. Execution Stack

A tree-walk evaluator executes nodes in environment chains.

Global Environment
Variables Bound:greet = [Closure: greet]

Declares a function `greet` using the `spell` keyword, then invokes it passing 'explorer' to bind to the `name` parameter in a local environment.

5. Terminal Console

The execution completes and prints values.

Hello explorer
Architecture

The Interpreter Pipeline

Hover over each architectural stage of the compiler stack to inspect its structural role in the execution flow.

01. The Lexer

Converts raw characters into syntax tokens.

02. The Parser

Constructs tree expressions enforcing rules.

03. The AST Node Trees

The syntactic map of the parsed program.

04. The Interpreter

Evaluates syntax nodes recursively.

05. The Environment Stack

Resolves scope values and closures.

Compiler Stage Specification

The Lexer

Written completely by hand, the lexer scans the source file character-by-character, identifying keywords (like 'spell'), symbols, literals, and identifiers while discarding whitespace and comments.

Craftsmanship

Inside the Codebase

Rune was constructed entirely by hand. Select a block to open the implementation details and read the source code.

01

Lexer Scanner

A pure character-by-character scan loop. Consumes source streams, identifies keyword lexemes, literal numbers/strings, and variables without RegEx shortcuts.

→ Inspect Source
02

Expression Parser

A clean recursive-descent parser. Handles math operator hierarchies and nested brackets correctly by climbing precedence levels.

→ Inspect Source
03

Abstract Syntax Trees

Strongly-typed expressions and statement structures representation. Visualizes the program tree in a syntax layout prior to evaluations.

→ Inspect Source
04

Runtime Evaluator

A dynamic tree-walk interpreter evaluation engine. Traces expression nodes sequentially while mutating scoping frame configurations.

→ Inspect Source
Language Internals

Closure Scope Explorer

Closures hold reference links to parent variables. Click through the step-by-step simulator to visualize the memory allocation changes.

closure_test.rn
1
spell make_adder(n) {
2
  spell add(x) {
3
    return x + n
4
  }
5
  return add
6
}
7
8
set add5 = make_adder(5)
9
write(add5(3))
Step 1 of 4
Global Scope EnvironmentParent: None
make_adderspell()
EXPLANATION:The interpreter registers the global spell template `make_adder` in the Global Scope environment table. No variables are bound yet.
Chronology

Engineering Log

A historical log of milestones during the construction of the Rune interpreter.

Jan 2025

v0.1.0 Initial Release

A complete tree-walk interpreter in Python: lexer, recursive-descent parser, environment chains, closures, standard built-ins, and an interactive REPL.

Jun 2025

v0.2.0 Package Refactor

Split packages into lexer, parser, ast, and runtime modules; isolated control-flow signals and centralizing keywords configuration.

Jun 2026

VS Code Extension v1.2.1

Syntax highlighting, snippets, and editor workspace execution integration with robust terminal path auto-discovery.

Jun 2026

Website & Docs Launch

Establishing the design system documentation and launching this editorial workspace registry with real-time pipeline visualizers.

Collaboration

Open Source Ecosystem

Explore the repositories that make up the Rune ecosystem. Read, fork, and write.

rune-corePublic repo

Core Language Interpreter

The central repository containing the hand-rolled tokenizer, recursive-descent parser, AST nodes, evaluator, and terminal shell (REPL).

View Source Files
rune-websitePublic repo

Documentation & Guides

The codebase of this web portal, built with Next.js, Tailwind v4, and MDX. Integrates custom design tokens and interactive scopes.

View Source Files
rune-vscodePublic repo

VS Code Language Extension

The VS Code tooling extension providing syntax highlighting configurations, brace completions, and local editor workspace support.

The source is the documentation.

Every module in Rune is built to be read. Dive directly into the implementation of our core subsystems.

Conclusion

Explore compiler internals.

© 2026 Rune Lang. Built by hand with pride.