Aether Programming Language
A general-purpose, dynamically typed programming language implemented in Rust — a fully-working tree-walking interpreter with async I/O, structs, iterators, and a self-hosted standard library.
Features
- Dynamic Typing — Runtime type checking with clear error messages
- Automatic Memory Management — Reference-counted garbage collection (no GC pauses)
- Async/Await —
async fn,await,Promise.all, configurable I/O thread pool - Event Loop —
on_ready(promise, callback),event_loop()for Node.js-style async - First-Class Functions — Closures, optional parameters, function expressions
- User-Defined Types — Structs with fields, methods, and
selfbinding - Error Handling —
try/catch/finally/throwwithe.messageande.stack_trace - Null Safety —
??null coalescing and?.optional chaining - Module System —
import,from ... import, aliases, filesystem resolution - Collections — Arrays, dicts, sets with comprehensive methods
- File I/O — Read/write files, directory listing, path utilities
- Multi-line Strings — Triple-quoted
"""..."""strings with raw content - Rich Standard Library — 40+ functions written in Aether itself
- Interactive REPL — Line editing with history and tab-completion
Quick Example
fn main() {
// Functional stdlib
let numbers = range(1, 11)
let total = sum(filter(map(numbers, fn(x) { return x * x }), fn(x) { return x % 2 == 0 }))
println("sum of even squares:", total) // 220
// Null safety: ?? and ?.
let name = null
println(name ?? "anonymous") // anonymous
println(name?.upper() ?? "UNKNOWN") // UNKNOWN
// Error handling with finally
let f = null
try {
throw "something went wrong"
} catch(e) {
println("caught:", e.message)
} finally {
println("cleanup always runs")
}
// Multi-line string
let query = """
SELECT * FROM users
WHERE active = true
"""
println(query)
}
Status
- Phase: 5 Complete ✅
- Tests: ~693 passing (134 unit + ~559 integration)
- Code Quality: 0 clippy warnings
- Documentation: 20+ comprehensive guides
Quick Start
Building from Source
git clone https://github.com/valarpirai/aether.git
cd aether
cargo build --release
./target/release/aether # REPL
./target/release/aether hello.ae # run a file
Your First Program
fn main() {
let name = "World"
println("Hello, ${name}!")
let nums = range(1, 6)
for n in nums {
println(n, "squared =", n * n)
}
}
Async I/O
fn main() {
set_workers(4)
let p1 = http_get("https://httpbin.org/get")
let p2 = http_get("https://httpbin.org/ip")
let results = await Promise.all([p1, p2])
println(results[0])
}
Documentation
Writing programs in Aether
Start here if you want to use the language — build scripts, automate tasks, or learn Aether.
| Guide | What it covers |
|---|---|
| REPL | Interactive shell and running .ae files |
| Strings | Literals, indexing, slicing, interpolation, methods |
| Error Handling | try/catch/finally/throw with stack traces |
| Structs | User-defined types with fields and methods |
| Modules | import, from…import, stdlib modules |
| Standard Library | range, map, filter, reduce, math, string, testing |
| Iterators | has_next() / next() protocol, custom iterators |
| JSON | json_parse(), json_stringify() |
| HTTP | http_get(), http_post() |
| Time | clock(), sleep() |
| Async/Await | async fn, await, .then(), Promise.all/race/allSettled, I/O pool |
| Configuration | Env vars and runtime configuration |
Hacking on Aether’s interpreter
Start here if you want to extend the language, fix a bug, or understand how the interpreter is built. Assumes familiarity with Rust.
| Guide | What it covers |
|---|---|
| Development Guide | Post-feature checklist, TDD workflow, code organisation |
| Architecture | System design, module layout, and roadmap |
| Testing Guide | Running tests, writing integration tests, debugging failures |
| Language Design | Complete language specification and design decisions |
| Lexer | Tokenisation — src/lexer/ |
| Parser | Recursive descent parsing — src/parser/ |
| Interpreter | Tree-walking evaluator — src/interpreter/evaluator/ |
| Garbage Collection | Rc-based memory management and cycle avoidance |
| Event Loop Internals | on_ready, event_loop, queue controls |
| Backlog | Planned features and open design questions |
What’s Working
| Area | Features |
|---|---|
| Core language | int, float, string, bool, null, array, dict, set; all operators; let, if/else, while, for, break, continue, return |
| Functions | declarations, expressions, closures, optional params, recursion |
| Strings | indexing, interpolation ${expr}, slicing, multi-line """...""", contains, index_of, replace, upper/lower/trim/split |
| Null safety | ?? null coalescing, ?. optional member access, ?. optional method call |
| Collections | array (push/pop/sort/slice/spread), dict (keys/values/contains), set (union/intersection/difference) |
| File I/O | read_file, write_file, read_lines, append_file, lines_iter, read_bytes, write_bytes, file_exists, is_file, is_dir, mkdir, list_dir, path_join, rename, rm |
| Error handling | try/catch/finally/throw; e.message, e.stack_trace; frames include filename and line |
| Loops | while, for-in, labeled break/continue for nested loops |
| Modules | import mod, from mod import fn, import mod as alias |
| Structs | fields, methods, self binding, mutable fields |
| Iterators | has_next(), next(), for-in over array/dict/set/string/iterator |
| Async/await | async fn, await expr, Promise caching, Promise.all |
| Event loop | on_ready(promise, callback), event_loop(); chained callbacks; Node.js-style concurrency |
| I/O thread pool | set_workers(n), AETHER_IO_WORKERS; async http, sleep, file I/O |
| JSON | json_parse(), json_stringify() |
| HTTP | http_get(url [, opts]), http_post(url, body [, opts]) — per-request timeout and user-agent |
| Standard library | range, enumerate, map, filter, reduce, find, every, some, abs, min, max, sum, clamp, join, repeat, reverse, starts_with, ends_with |
| Testing framework | assert_eq, assert_true/false/null, expect_error, test, test_summary |
| REPL | rustyline with history, tab-completion, _help/_env/_exit |
Examples
Browse the examples directory or jump straight to a topic:
| Example | What it shows |
|---|---|
| Hello World | First program, interpolation |
| Null Safety | ?? and ?. operators |
| Multi-line Strings | Triple-quoted strings |
| Error Handling | try/catch/finally, stack traces |
| File Utilities | list_dir, path_join, rename, rm |
| Shapes (Structs) | User-defined types with methods |
| Async / Concurrent I/O | Promise.all, thread pool |
| Event Loop | on_ready, chained callbacks |
| Data Processing | Functional pipeline |
| Collections | Arrays, dicts, sets |
License
MIT License — see LICENSE
Last Updated: 2026-04-30
Version: 0.1.0
Status: Active Development