Modern Systems Programming with Safety and Performance
Strong static typing • Ownership & borrowing • Async/await • Zero-cost abstractions
Apex is a modern systems programming language that combines the safety of Rust with the expressiveness of modern high-level languages. Built on LLVM, Apex compiles to native machine code with zero runtime overhead while providing strong compile-time guarantees through its advanced type system and borrow checker.
- 🔒 Memory Safety - Ownership system prevents races, null pointers, and use-after-free bugs at compile time
- ⚡ Zero-Cost Abstractions - High-level features compile down to machine code with no runtime penalty
- 🎯 Strong Static Typing - Comprehensive type system with generics, traits, and algebraic data types
- 🔄 Async/Await - First-class support for asynchronous programming with Task types
- 📦 Pattern Matching - Exhaustive pattern matching for control flow and destructuring
- 🧩 Generics - Full generic programming support with type parameters and constraints
- 🛠️ Modern Tooling - Fast compilation, helpful error messages, and integrated toolchain
- 🚀 LLVM Backend - Leverages LLVM for world-class optimization and cross-platform support
- 📁 Multi-File Projects - Organize code with
apex.tomlproject files - 📦 Java-Style Namespaces - Simple package/import system (no
mod.rsneeded)
Detailed documentation is available in the docs/ directory:
- Installation: How to build and install Apex.
- Quick Start: Write your first Hello World program.
- Editor Setup: Recommended VS Code settings.
- Syntax: Basic syntax rules.
- Variables & Mutability:
valvsvar, ownership. - Types: Primitives and composite types.
- Control Flow:
if,while,for,match. - Functions: Definition, lambdas, higher-order functions.
- Classes: OOP features.
- Interfaces: Polymorphism.
- Enums: ADTs and pattern matching.
- Ranges: Iterator-based numeric sequences.
- Modules: Code organization.
- Ownership & Borrowing: Apex's core safety model.
- Generics: Flexible type reuse.
- Async/Await: Concurrency model.
- Error Handling:
ResultandOptiontypes.
git clone https://github.com/TheRemyyy/apex-compiler.git
cd apex-compiler
cargo build --releaseAdd target/release to your PATH.
Run all bundled examples with platform-specific scripts from the repo root:
- Windows:
scripts\\test_examples.bat - Linux:
bash scripts/test_examples_linux.sh - macOS:
bash scripts/test_examples_macos.sh
# Create new project
apex new my_project
cd my_project
# Project structure:
# ├── apex.toml
# └── src/
# ├── utils.apex # package utils;
# └── main.apex # package main;
# Build and run
apex run// src/utils/math.apex
package utils.math;
function factorial(n: Integer): Integer {
if (n <= 1) { return 1; }
return n * factorial(n - 1);
}
// src/main.apex
package main;
import utils.math.*; // Wildcard import
import utils.math.factorial; // Specific import
function main(): None {
result: Integer = factorial(5);
println("5! = " + to_string(result));
return None;
}We welcome contributions! Please see CONTRIBUTING.md for details on how to get started.
This project is licensed under the MIT License - see the LICENSE file for details.