AI-Native Systems Programming Language - Designed to reduce AI hallucinations and enable AI self-iteration
AetherLang is an AI-Native Programming Language built from the ground up to:
- Reduce AI Hallucinations - Explicit interfaces, constrained syntax, semantic annotations
- Enable AI Self-Iteration - AI-readable IR, structured feedback, sandboxed optimization
- Maintain Rigor & Safety - Contract programming, effect system, ownership semantics
π Self-hosting complete! AetherLang compiler is written in AetherLang.
| Component | Status | Functions | Notes |
|---|---|---|---|
| Lexer | β 100% | 23 | Tokenization with 80+ token types |
| Parser | β 100% | 76 | Full AST generation |
| Semantic Analyzer | β 100% | 68 | Type checking, ownership analysis |
| IR Generator | β 100% | 52 | Three-address code generation |
| Codegen | β 100% | 40 | Native object file output |
| Total | β | 259 | All modules compile to native code |
- Type System:
i8-i64,u8-u64,f32,f64,bool,char,*T,&T,&mut T - Generics: Type erasure with
Vec<T>,Option<T>style syntax - Traits:
trait Display { fn display(&self); } - Lifetimes:
&'a T,&'static Tannotations - Type Aliases:
type Int = i64; - Closures:
|x, y| x + ylambda syntax
- Use Imports:
use module::{Item1, Item2} - Dynamic Loading: Auto-search in
.,src_aether/,stdlib/ - Public Exports:
pub struct,pub fn
- FFI:
extern "C" { fn puts(s: *u8) -> i32; } - Unions: Memory-overlapping types
- Volatile:
*volatile Tfor memory-mapped I/O - Inline ASM:
asm!("mov eax, 1")(planned)
AetherLang introduces a novel Dual-Layer Architecture to balance high-level productivity with system-level control.
The high-level logic layer. Used for rapid development, scripting, and business logic.
- Indentation-based syntax for readability
- Mutable-by-default to align with algorithmic pseudocode
- Implicit Context management (Anti-Leak System)
- Transpiles directly to Layer 0 (Aether Core)
The low-level system layer. Used for kernel, drivers, and performance-critical paths.
- Explicit Ownership & Lifetimes
- Effect System (
pure,effect[io]) tracking side-effects - Contract Programming (
requires/ensures) for formal verification
src/
βββ frontend/ # Lexer, Parser, Semantic Analysis, Module System
β βββ lexer.rs # 80+ tokens, unicode support
β βββ parser.rs # Full expression/statement parsing
β βββ semantic.rs # Type inference, ownership, traits
β βββ module.rs # ModuleLoader for use statements
βββ script/ # Aether Script Frontend & Transpiler (Layer 1)
βββ middle/ # IR Generation and Optimization
β βββ ir.rs # Three-address code IR
β βββ ir_gen.rs # AST to IR translation
βββ backend/ # ELF Linker, C / LLVM Code Generation
β βββ llvm/ # LLVM backend integration
βββ ai_ir/ # π AI-Readable IR Layer
βββ types/ # Type System & Resolution
# Build the compiler
cargo build --release --features llvm
# Compile and run a program
cargo run --features llvm -- build examples/hello.aeth
./hello
# Run all tests
cargo test// hello.aeth
extern "C" {
fn puts(s: *u8) -> i32;
}
fn main() -> i32 {
puts("Hello, AetherLang!" as *u8);
return 0;
}fn identity<T>(x: T) -> T {
return x;
}
fn main() -> i32 {
let a: i64 = identity(42);
return a as i32;
}// point.aeth
pub struct Point { x: i64, y: i64 }
pub fn create_point(x: i64, y: i64) -> Point { Point { x: x, y: y } }
// main.aeth
use point::{Point, create_point}
fn main() -> i32 { ... }| Phase | Status | Description |
|---|---|---|
| P0: Self-Hosting | β | 5/5 modules, 259 functions compiled |
| P1: Core Language | β | Floats, generics, closures, traits, lifetimes, modules |
| P2: Platforms | β | Linux, macOS, Windows CI passing |
| P3: SIMD/Matrix | β | Vector types f32x4, BLAS FFI, Matrix4x4 |
| P4: Kernel Dev | β | Inline ASM, naked functions, atomic, MMIO |
| P5: AI/GPU | β | CUDA, Metal, Tensor, Autograd |
AetherLang includes JXZ - a cross-platform package manager (like Homebrew/Cargo):
# Project management
jxz init # Create new project
jxz build # Build project
jxz run # Build and run
jxz test # Run tests
# Dependency management
jxz add <pkg> # Add dependency
jxz install # Install from Jxz.lock
jxz update # Update dependencies
# System packages (Homebrew-style)
jxz install <pkg> # Install to ~/.jxz/Cellar
jxz search <q> # Search registry
jxz list # List installed
jxz doctor # Check for issues161 functions written entirely in AetherLang (self-hosting!)
- Language Guide - Complete language reference
- Grammar Spec - Formal EBNF grammar
- Type System - Type inference rules
- AI-IR Design - AI-Native Interface
- Aether Script Spec - Layer 1 syntax
- Quick Start Guide - Getting started
- Migration Guide - From Rust/C
AetherLang is designed to be AI-friendly:
- Constrained Syntax - Fewer ways to express the same thing
- Explicit Semantics - Ownership, effects, contracts all visible
- Structured Errors - Machine-readable output with fix suggestions
- AI-IR Layer - Semantic graph + intent annotations for AI understanding
Contributions welcome! See CONTRIBUTING.md for guidelines.
Apache License 2.0 - see LICENSE