Aether is a next-generation programming language designed from first principles for an era where Artificial Intelligence is a primary user and collaborator in software development. This README covers the complete toolchain for building, testing, and deploying Aether programs.
Aether solves the "two-language problem" in AI development by providing a unified, high-performance environment that bridges research prototyping and production deployment. The language features:
- AI-Native Design: Tokenized AST as canonical representation, optimized for LLM generation
- Performance Without Compromise: Eliminates Python's bottlenecks while maintaining research-friendly flexibility
- Safety by Design: Advanced type system prevents common AI bugs at compile time
- Universal Deployment: Single codebase compiles to native, WebAssembly, GPU kernels, and mobile targets
- Rust 1.70+ (for building the compiler)
- LLVM/MLIR 18.0+ (optional, for advanced compilation features)
- Git (for version control)
# Clone the repository
git clone https://github.com/aether-lang/aether
cd aether
# Build the compiler and tools
make build
# Or build with Cargo directly
cargo build --release
# Install system-wide (optional)
make installCreate a file hello.ae:
# Hello World Aether Program
(func main ()
(call print "Hello, World from Aether!")
(return 0))Compile and run:
# Compile to native executable
aetherc build hello.ae --target native
# Run the program
./helloThe main compiler that transforms Aether source code into various target formats.
# Compile to native executable
aetherc build input.ae --target native
# Compile to WebAssembly
aetherc build input.ae --target wasm32
# Compile with GPU acceleration
aetherc build input.ae --target gpu --device cuda
# Compile with optimizations
aetherc build input.ae --target native --optimize --release- Native:
--target native- Produces platform-specific executables (ELF/Mach-O/PE) - WebAssembly:
--target wasm32- Browser-compatible WebAssembly modules - GPU:
--target gpu --device cuda|opencl|vulkan- GPU compute kernels - Mobile:
--target mobile --platform ios|android- Mobile-optimized bytecode - Cloud:
--target cloud- Microservice-ready binaries with RPC stubs
# Enable debug information
aetherc build input.ae --debug --symbols
# Cross-compilation
aetherc build input.ae --target native --arch x86_64 --os linux
# Link external libraries
aetherc build input.ae --link-lib math --link-lib pthread
# Generate intermediate representations
aetherc build input.ae --emit-llvm --emit-mlir --emit-ast
# Profile-guided optimization
aetherc build input.ae --pgo-profile profile.dataBidirectional transpiler that converts between human-readable and machine-optimized syntax.
# Format to human-readable syntax
aetherfmt --to-sweet input.ae
# Format to canonical S-expressions
aetherfmt --to-canonical input.ae
# Format in-place
aetherfmt --in-place *.ae
# Check formatting without changes
aetherfmt --check src/Human-readable "sweet" syntax:
func fibonacci(n: i32) -> i32 {
if n <= 1 {
return n
}
return fibonacci(n-1) + fibonacci(n-2)
}
Canonical S-expression syntax:
(func fibonacci ((n i32)) i32
(if (<= n 1)
(return n)
(return (+ (call fibonacci (- n 1))
(call fibonacci (- n 2))))))Comprehensive static analysis tool for performance, correctness, and optimization insights.
# Full analysis suite
aether-analyze input.ae
# Memory analysis
aether-analyze --memory input.ae
# Tensor shape analysis
aether-analyze --shapes input.ae
# GPU occupancy analysis
aether-analyze --gpu-occupancy input.ae
# Performance bottleneck detection
aether-analyze --performance input.ae
# Generate analysis report
aether-analyze input.ae --output report.json --format json- Memory Safety: Detects use-after-free, memory leaks, buffer overflows
- Tensor Shapes: Validates tensor operations and shape compatibility
- GPU Utilization: Analyzes GPU memory usage and kernel efficiency
- Performance: Identifies bottlenecks and optimization opportunities
- Concurrency: Detects race conditions and deadlocks
- AI Model Validation: Verifies neural network architectures
Browser-based interactive development environment for experimentation and learning.
# Start local playground server
aether-playground --port 8080
# Open in browser automatically
aether-playground --open
# Enable GPU acceleration in playground
aether-playground --gpu --device cuda
# Load project context
aether-playground --project ./my-project- Real-time compilation and execution
- Interactive tensor visualization
- GPU kernel profiling
- Model architecture visualization
- Collaborative editing support
- Export to various formats
Comprehensive testing framework for Aether programs.
# Run all tests
aether-test
# Run specific test file
aether-test tests/math_test.ae
# Run tests with coverage
aether-test --coverage
# Run performance benchmarks
aether-test --benchmark
# Generate test report
aether-test --report html --output test-results/Specialized tool for testing file compilation across the entire project.
# Run all file compilation tests
aether-file-test run
# Run with custom configuration
aether-file-test run --config custom-config.toml
# Generate additional test cases
aether-file-test generate --categories core,types,ai
# Validate test setup
aether-file-test validate
# Show project statistics
aether-file-test statsproject_root = "."
compiler_path = "./target/release/aetherc.exe"
output_directory = "target/file_compilation_tests"
test_directories = ["examples", "tests"]
generate_additional_tests = true
test_categories = ["CoreLanguage", "TypeSystem", "AIFeatures", "ErrorHandling"]
report_format = "Console"
max_parallel_compilations = 4
verbose = true
[compilation_timeout]
secs = 30
nanos = 0The project includes a comprehensive Makefile for common development tasks:
# Build everything
make build
# Run all tests
make test
# Run only file compilation tests
make test-files
# Clean build artifacts
make clean
# Install tools system-wide
make install
# Development mode with file watching
make watch
# Generate documentation
make docs
# Run benchmarks
make benchmarkStandard Rust build commands work seamlessly:
# Build all binaries
cargo build --release
# Build specific tool
cargo build --bin aetherc --release
# Run tests
cargo test
# Generate documentation
cargo doc --open
# Run benchmarks
cargo benchAether uses S-expressions as its canonical form, with optional human-readable syntax:
# Variables and functions
(let x 42)
(let y (+ x 8))
(func greet (name)
(call print "Hello," name))
# Control flow
(if (> x 0)
(call print "Positive")
(call print "Non-positive"))
# Loops
(for i (range 10)
(call print "Iteration" i))# Tensor operations
(let matrix (tensor [[1 2] [3 4]]))
(let result (matmul matrix (transpose matrix)))
# Neural network definition
(model SimpleNet
(layer dense 784 512 relu)
(layer dense 512 256 relu)
(layer dense 256 10 softmax))
# Automatic differentiation
(let loss (mse-loss predictions targets))
(let gradients (backward loss))# Actor-based concurrency
(actor DataProcessor
(state buffer [])
(handler process-data (data)
(set! buffer (append buffer data))
(when (> (length buffer) 1000)
(call flush-buffer))))
# Distributed computation
(distributed-map process-chunk data-chunks
:nodes 4
:gpu-enabled true)# Multi-stage compilation with custom passes
aetherc build input.ae \
--pass tensor-fusion \
--pass gpu-optimization \
--pass dead-code-elimination \
--target gpu
# Profile-guided optimization workflow
aetherc build input.ae --profile-generate
./input # Run with representative data
aetherc build input.ae --profile-use=profile.data --optimize# Export to ONNX format
aetherc export model.ae --format onnx --output model.onnx
# Generate C++ bindings
aetherc bind model.ae --language cpp --output bindings/
# Create Docker deployment
aetherc deploy model.ae --target docker --optimize-size# Watch mode for development
aether-playground --watch src/
# Continuous testing
make watch # Runs tests on file changes
# Performance profiling
aether-analyze --profile input.ae
aether-test --benchmark --compare-baseline-
MLIR/LLVM not found
# Install LLVM/MLIR # Ubuntu/Debian: sudo apt install llvm-18-dev mlir-18-tools # macOS: brew install llvm@18 # Set environment variable export MLIR_SYS_180_PREFIX=/usr/lib/llvm-18
-
Compilation timeout
# Increase timeout in configuration aether-file-test run --compilation-timeout 60 -
GPU compilation issues
# Check GPU drivers and CUDA installation nvidia-smi # For NVIDIA GPUs # Use CPU fallback aetherc build input.ae --target native --no-gpu
# Enable verbose logging
AETHER_LOG=debug aetherc build input.ae
# Generate debug symbols
aetherc build input.ae --debug --symbols
# Use debug build of compiler
cargo build --bin aetherc # Debug mode
./target/debug/aetherc build input.ae# Set up development environment
make env-setup
# Run development tests
make dev-test
# Check code formatting
cargo fmt --check
# Run linter
cargo clippy# Run full test suite
make test
# Run specific test categories
aether-file-test run --test-categories CoreLanguage,TypeSystem
# Add new test cases
aether-file-test generate --categories custom- Use
--parallelflag for multi-threaded compilation - Enable incremental compilation with
--incremental - Use
--cache-dirto persist compilation cache
- Profile with
aether-analyze --performance - Use profile-guided optimization (PGO)
- Enable GPU acceleration for tensor operations
- Consider WebAssembly for cross-platform deployment
This project is licensed under MIT OR Apache-2.0. See LICENSE files for details.
For more detailed information about specific tools, run <tool-name> --help or consult the individual tool documentation.