Roadmap
Milestones are small and independently testable. A feature counts as done
only when tests show it working (go test ./...). A milestone that depends
on an undecided language rule waits until the owner decides it.
v0.1: Core language Done
Scope set by the owner: keep it very simple. Variables and assignment, conditionals, loops, and basic functions.
- Project layout:
cmd/,internal/{lexer,parser,ast,checker,types,runtime,diagnostics,driver},tests/ - Lexer with source positions; comments; decimal integer, string, and bool literals
- Diagnostics with code,
line:col, source excerpt, caret, and help text -
package a.b;declaration - Top-level functions:
[visibility] Type name(Type p, …) { … }, calls in any order, recursion - Types
int/sint,uint,bool,string,void - Variable declarations with initializers,
=,+= -= *= /= %=,++/-- - Arithmetic, comparison, and logical operators with C-style precedence; short-circuit
&&/|| -
if/else if/else,while,for,break,continue,return - Static checking: undefined names, arity, assignability, definite return, block scoping
- Signed → unsigned assignment rejected at compile time (
ASX-TYPE-004), along with negative constants →uintand mixed signedness - Exact integer arithmetic; overflow and division by zero are located runtime errors (never silent wraparound)
-
trace(...) - Tree-walking interpreter;
main()result becomes the exit code - CLI:
runescript run|check|version(buildadded in v0.2) - Examples (
examples/), with golden-output tests - Logo:
assets/runescript.svgand an icon variant, rasterized to PNG via headless Edge (scripts/render-logo.sh) - Docs: specification, user guide, roadmap
v0.2: Standard library and functions
Standard library, part 1 Done
-
use "std:<name>";declarations and qualified calls (string.toUpper(s)) - Native-package registry in
stdlib/: Go-implemented functions with checked RuneScript signatures -
std:string: all 25 functions from Go’sstringspackage expressible withstring/int/bool, camelCase names, byte offsets (now 43, withchar, callbacks, and arrays) - Docs (
docs/guide/10-std-string.md) and an example (examples/strings.rsc)
Functions Done
- Required access modifier on every function:
public|private|protected <type> <name>(…) - Prototypes (forward declarations), with signature checking
- Nested functions, including recursion and mutual recursion through prototypes
- Function types
int(int, int), function values, callbacks, functions returning functions - Lambdas
(int a) => a + 1and(int a) => { … } - Function boundaries: no capture of enclosing variables
- Docs (guide chapter 6) and an example (
examples/callbacks.rsc) - Enforce
private(file) andprotected(package) once multi-file programs exist (done in v0.3)
Tests and examples Done
- Fuzz tests for the parser/checker and the interpreter (no crashes on arbitrary input)
- Golden error programs for functions and
use; runtime-error golden programs with expected partial output - Diagnostics are reported in source order
- Examples:
callbacks.rsc,primes.rsc,strings.rsc,boundary_error.rsc, plusexamples/README.md
Settle v0.1 provisional rules Done (owner decisions, 2026-10-17)
- Final source file extension:
.rsc(.rswas Rust’s) - Final diagnostic prefix:
ASXstays - Integer widening model: intermediate results widen, variables keep their type (option A, done in v0.5);
uintstays 32 bits - Explicit checked conversion syntax: C-style
(T) x(v0.3) - Unsigned → signed and mixed signedness: always an explicit, checked conversion; mixed arithmetic stays an error
- Entry point: exactly
protected int main()(ASX-ENTRY-002otherwise); arguments come fromstd:process - Relaxed:
T x;takes the zero value (ASX-TYPE-028for types without one); shadowing is allowed in nested blocks, withASX-WARN-009. Kept: read-only parameters, mandatory braces
JavaScript target Done
- Typed IR (
internal/ir) lowered from the checked AST, with an independent verifier -
internal/jsgen: ES module output with checked integer arithmetic, call-depth limit, and located runtime errors -
std:stringin JavaScript with UTF-8 byte offsets and Go-derived Unicode tables -
runescript build [--target js] [-o out.js]; modules run withnodeorimport { run } - Differential tests (interpreter vs. Node.js) for every example and runtime program, and randomized
std:stringconformance - JavaScript interop: moved to “JavaScript target, part 2” below
- Measure generated-code performance before optimizing (e.g. inlining range checks)
Warnings Done (requested by the owner, 2026-10-16)
- Warning severity in diagnostics (
warning ASX-WARN-…), reported only for programs without errors -
-Werrorand--allow <codes>onrun,check, andbuild - Unused locals and parameters (
ASX-WARN-001/002), unuseduse(003), unreachable code (004), discarded results (005) - Docs (guide chapter 8, in all translations) and tests
JavaScript target, part 2 (owner decisions, 2026-10-16)
- Generated code limited to ES2015 plus
BigInt,??, and ES modules (import.metaincluded);tests/jslevel_test.golints every generated program and the runtime (removed??=and BigInt**) - No
processdependence beyond running the module directly:processis only used underimport.meta.main -
extern "<module>" Type name(Type p, …);declarations for JavaScript functions (nouse "js:…", owner decision) - Host-neutral
rune:fs(readFile, writeFile, appendFile, exists, remove) mapped tonode:fs;node:/bun:/deno:modules allowed withASX-WARN-006 - Boundary checks on every result (scalars and errors; float32 rounded):
ASX-RUN-007TypeError; JavaScript exceptions areASX-RUN-008Error; error values cross as the exportedRSErrorclass - The interpreter rejects programs with externs (
ASX-TARGET-002); Node.js tests intests/testdata/extern - Arguments and environment:
std:processon both targets instead of a JavaScript-onlyrune:process(2026-10-17) - Objects, arrays, and callbacks across the boundary (classes and arrays exist now; design the crossing first)
- Source maps:
runescript build --source-mapwrites<out>.map(statements and functions mapped, sources included);runescript devinlines one (2026-11-01)
DOM interop (owner decisions, 2026-10-16; started)
- Internal list of HTML4 and HTML5 elements (
internal/dom): void and obsolete elements with hints, typed attributes per element (string, url, bool, int, uint, float, keywords, id references, tokens, events), global attributes and event handlers,data-*/aria-*, and obsolete HTML4 presentational attributes; cross-checked against independent element lists - SVG 1.1 and SVG 2 elements in their own namespace (case-sensitive names; SVG 1.1 elements SVG 2 removed are obsolete with hints), typed attributes including lengths, presentation attributes with CSS-wide keywords,
hrefwith obsoletexlink:href - Declarative, component-based UI like React’s, but without JSX and without a virtual DOM: state changes update the affected DOM nodes directly
- Templates in
.rscfiles, in the style of Vue/Svelte components and Laravel Blade:$if/$elseif/$else/$endif,{{ }}interpolation that escapes HTML by default;Elementis a type imported withuse "rune:dom";(2026-10-16) -
$foreach (T x in a) … $endforeach, header checked likefor each; the list is rebuilt when a rune its array expression read changes (2026-11-01) - Keyed
$foreachupdates (rebuild only the items that changed) - Reactivity through explicit SolidJS-style signals, called runes:
Signal<int> count = signal(0);, readcount()orcount.get(), writtencount.set(n); setting one updates only the DOM nodes that read it; nested functions and lambdas may use the runes around them - Elements: HTML4 (obsolete ones warn), HTML5, and SVG; attributes typed per element, checked for static values and
{{ }}types; bound keyword and URL values checked at run time - Mounting without a router:
use "./App.rsc";thendom.renderApp(app.App, "#app");renders one component into the element the selector names; any CSS selector works, with a warning unless it is an id selector - Templates switch to SVG inside
<svg>(and back to HTML insideforeignObject) - Tests: lexer, parser, checker, and fake-DOM runs on Node.js of test programs and every web example; counter and SVG checked in Edge
- Docs: guide chapter 15 (and translations), diagnostics, spec section 13, web examples
- Component tags with properties, event objects (input values), two-way binding
- A built-in
Signal<T>for scalarT(general generics still open); callbacks stay inside RuneScript, so no JavaScript callbacks were needed
Live reload (owner request, 2026-10-16)
-
runescript dev: serves the entry file’s folder on 127.0.0.1 (port 5173, or the next free one), compiles in memory, rebuilds when a program file changes, reloads the browser over Server-Sent Events, and shows compile errors in an overlay; the user’sindex.htmlor a generated page -
runescript run --watch: runs a command-line program again whenever one of its files changes - Polling file watcher (
internal/watch), standard library only; tests for the server, the watcher, and watch mode, and a check in Edge of reload and the overlay - Hot module replacement for
rune:domcomponents, keeping their runes’ values (needs components)
Bundled JavaScript runtime (planned, not started)
- A small ES2015-compatible JavaScript engine shipped with RuneScript, so compiled programs run without Node.js or Bun. It supports the extras above (
BigInt,??, modules) - Conformance: its output is compared against Node.js (ES2022), the reference host
v0.3: use for packages and files Done
Syntax decided by the owner: use "<package_name>"; and use "<file_path>";,
with paths relative to the current working directory. (std: works since v0.2.)
- Decisions: a path contains
/; a package is the.rsmfiles of its directory; qualifier = last segment orasalias; a file use binds the file’s package; cycles are errors; exactly onemain, in any file; file extensions are a convention (any extension works when named directly) -
internal/loader: load and parse every used file once; detect cycles - Checker: package scopes, per-file private scopes, qualified calls,
public/protected/privateenforced (ASX-NAME-011) - Diagnostics and runtime errors name the file; the JavaScript target bundles every file into one module
- Tests:
tests/testdata/multi(missing files, cycles, mismatched packages, clashes, visibility, duplicates, bad names, a runtime error in a used file, running from a different working directory), all also run on Node.js - Qualified function values (
geom.areawithout a call), 2026-10-16
Floats, conversions, and errors Done (requested by the owner during v0.3)
-
float(float32 by default, widening exactly, per CLAUDE.md §4.4),float32,float64; literals64.3,1e10; IEEE 754 (NaN,Infinity,isNaN,isFinite), as in ActionScript 3 - Float formatting as in ActionScript 3, identical on both targets
(
internal/conv, tested against Node.js on random values) - Checked conversions
(T) xbetween numbers, strings, and bools; compile-time checks for constants -
Error,RangeError,TypeError,ArgumentError;new, fieldsmessage/name/errorID -
throw,try/catch/finally, untypedcatch (e);return,break, andcontinueinfinallyas in AS3; runtime errors are catchable (except the call-depth limit) - Interpreter and JavaScript target behave identically (differential tests), and error unwinding stays linear in the call depth
-
std:math(2026-10-17)
Installation and source text Done
-
install.sh(Linux, macOS) andinstall.ps1(Windows): check Go (found, ≥ 1.25, working), build the CLI, install it per user, add it to PATH and setRUNESCRIPT_HOME, verify with a test program; uninstall; tested in scratch locations -
runescript versionreports the commit or module version and the Go toolchain - Source encodings: UTF-16/UTF-32 (and a UTF-8 byte-order mark) are
converted; other non-UTF-8 files are rejected (
ASX-LEX-007) on every target -
runescriptflag to resolve uses from a directory other than the working directory, if wanted (optional; moved to Later)
v0.4: Strings, output, and the system Done
- String concatenation
+(strings only) and interpolation$"…{x}…"(2026-10-16) -
string.len,string.slice,string.runeCountin bytes;charas a Unicode scalar with'a'literals (2026-10-16) -
std:stringfunctions that takecharand callbacks:containsRune,indexRune,indexFunc,trimFunc,map, … (2026-10-16) - Escape sequences:
\u{...}Unicode escapes and\0(2026-10-17) - Colored diagnostics: errors red, warnings yellow,
--color=auto|always|never,NO_COLOR(2026-10-17) -
std:io:printwithout a newline,error/warnlines on standard error (red/yellow on a terminal), standard input by line, byte, or all at once (2026-10-17) -
std:process:args,env,hasEnv,cwd,platform;runescript run prog.rsc args…andnode prog.js args…(2026-10-17) -
std:fson both targets: files, directories (mkdir,mkdirAll,readDir,walk,remove,removeAll),copyFile,rename,size,tempDir, with the same error messages everywhere (2026-10-17) -
std:path: Node.js’s path semantics, implemented rather than wrapped, with platform,posix…, andwin32…versions; tested against Node.js (2026-10-17) - Example: a Brainfuck interpreter with 32,768 cells (
examples/brainfuck.rsc) (2026-10-17) - Binary files:
fs.readBytes,fs.writeBytes,fs.appendByteswithArray<uint8>, andstring.bytes/string.fromBytes(2026-10-20)
v0.5: Numbers Done
- Explicit-width integers (
int8…int64,uint8…uint64), checked in every width; BigInt on the JavaScript target (2026-10-17) - Bitwise operators and shifts, with checked shift counts and trapping
<<(2026-10-17) - Widening, option A: exact intermediate results within int64, stored values checked; boundary, non-contraction, and randomized cross-target tests (2026-10-17)
-
float,float32,float64(v0.3); widening is exact, so representation only matters once floats are stored in arrays/structs - Literal forms: hex
0xFF, binary0b1010, octal0o17,_separators (2026-10-17) -
std:math: Go’smathon float64, int helpers, constants; transcendental functions from one shared implementation (internal/fmath), bit-identical on both targets (2026-10-17)
v0.6: Aggregates
-
Array<T>: literals, bounds-checked indexing,length,push,pop, reference semantics (2026-10-16, details provisional) -
for each (T x in a)loops, nested arrays (Array<Array<T>>), and the methodsinsert,removeAt,slice,indexOf,contains,reverse,sort(),sort(less)(stable, same comparator calls on both targets) (2026-10-20) -
std:fsbinary files (Array<uint8>), see v0.4 (2026-10-20) -
std:csv: parse and formatArray<Array<string>>(RFC 4180, any separator, errors with line and column) (2026-10-26) -
std:json: an opaquejson.Value(the first opaque std type) read with checked functions, built withfrom…functions, and written withjson.stringify/stringifyIndent; one parser on both targets, tested against random valid and broken texts (2026-10-20) -
std:matrix: functions overArray<Array<float64>>(owner chose a library, no new type): products, transpose, determinant, inverse, solve, bit-identical on both targets (2026-10-26) -
struct: value semantics (copy on assignment), named-field literals, nested field writes,==by field (2026-10-17) - Struct methods and constructors, with read-only
thisin methods and writablethisin constructors
Next, in order (owner, 2026-10-22)
std:csv(above, done 2026-10-26)std:matrix(above, done 2026-10-26)std:semver(done 2026-10-26)-
compare,gt,lt,eq,satisfies(andneq,gte,lte,valid,validRange,major,minor,patch,prerelease,build) on version strings, following SemVer 2.0.0 precedence and npm-style ranges (^1.2.0,~1.2.0,>=1.2.0 <2.0.0), checked against npm’s semver package - An invalid version string throws a catchable error (
ArgumentError)
-
- Module versions
- Every
.rsmfile must declarepublic semver versionorpublic string version;public string authorandpublic string licenseare optional - The metadata goes at the top of the file, after the
uselines - Contextual
semverliterals and builder, includingsemver(1, 2, 3, "rc", 1, ["build", "5"]) - Programs read a version as a
stringusinggeom.versionorgeom.version['a'] - Versions for the
std:modules, once the standard library is finished
- Every
- Performance
- Profile the interpreter on the
bench/suite - Numbered variable slots, reusable call frames, operator codes, and no
deferper call - Compile verified IR control flow and common expressions to Go closures in
run, with typed floating-point arithmetic and the tree-walking reference tested for agreement - Pure Go only: no
unsafeand no hand-written machine code
- Profile the interpreter on the
Editor support (owner request, 2026-10-26)
- Language server
runescript lsp(internal/lsp): diagnostics as you type (unsaved buffers included), hover, go to definition, completion, and document symbols - VS Code extension (
editors/vscode): TextMate grammar, language configuration, language client - Vim and Neovim plugin (
editors/vim): syntax, indentation, file type, Neovim 0.11 LSP configuration - Emacs major mode (
editors/emacs): highlighting, indentation, Eglot and lsp-mode registration (not yet tested in Emacs) - Find references across loaded programs, signature help, local rename, block indentation, and a quick fix for unused standard-library imports
- Workspace-wide rename for exported symbols
- Publish the VS Code extension (Marketplace, Open VSX) and the Emacs mode (MELPA)
v0.7: Graphics package (current)
Games were AS3’s main use, so graphics are a first-class goal. RuneScript uses the same graphics API on desktop and in the browser with raylib’s WebAssembly backend.
- Raylib via
raylib-goas the desktop backend -
use "rune.gfx";for windows, frames, shapes, text, textures, keyboard, and mouse -
use "rune.gui";with raygui buttons, labels, and checkboxes - Headless binding tests and two example games in
examples/native/ - Browser build using raylib’s WebAssembly backend with
build --target wasm
Web compilation
-
build --target webwith separate HTML and JavaScript entries for static multi-page sites - Reuse identical runtime modules and extract simple static template CSS with
--extract-css - Share RuneScript application code across page entry points
- Multi-page project support in
runescript dev
Depends on: use (v0.3), floats (v0.5), and structs for colours and vectors (v0.6).
v0.8: Classes
- Simple classes (owner decisions, 2026-11-01):
public class Name { … }with fields, methods, and one constructorpublic Name(…) { … }; objects made withnew(new pkg.Name(…)), shared by reference,==by identity, traced as[object Name];thisrequired; no nested classes. Both targets, guide chapter 24 (2026-11-01) - Visibility enforcement on members:
public/protected(package) /private(file), as at the top level (2026-11-01) - No null: fields without a zero value need an initializer or a first value at the start of the constructor (2026-11-01, provisional)
- Inheritance / interfaces (design first)
-
staticmembers, methods as values, getters and setters - Objects across the JavaScript boundary
-
std:stringadditions that need arrays:split,splitN,splitAfter,splitAfterN,fields,fieldsFunc,join(2026-10-16) -
std:stringadditions that need multiple returns or classes (cut, builder/replacer)
v0.9: std:symrs (symbolic mathematics)
A built-in port of the owner’s SympJS library: symbols, expression trees, simplification, differentiation, integration, equation solving, matrices, complex numbers, and Taylor and Fourier series.
- Design the RuneScript API (expression values with chained methods need classes or an opaque
Exprtype) - Port in layers: expressions and simplification →
diff/int→ solving → trig → complex → matrices → Taylor/Fourier - Output as text and LaTeX instead of SympJS’s HTML renderer (there’s no browser)
Depends on: floats (v0.5), arrays (v0.6), classes or opaque native types (v0.8), function values (v0.2).
Later
- Audio in
rune.gfx - A
runescriptflag to resolve uses from a directory other than the working directory, if wanted - Better parser error recovery (report more than one syntax error)
- Further performance work (bytecode VM, a native-binary build mode) only if the closure compiler is measured and found not fast enough