Skip to content

TheRemyyy/apex-compiler

Repository files navigation

Apex Programming Language

Modern Systems Programming with Safety and Performance

Website Rust LLVM

Strong static typing • Ownership & borrowing • Async/await • Zero-cost abstractions

Quick StartExamplesDocumentation


Overview

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.

Key Features

  • 🔒 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.toml project files
  • 📦 Java-Style Namespaces - Simple package/import system (no mod.rs needed)

Documentation

Detailed documentation is available in the docs/ directory:

Getting Started

Language Guide

Advanced

⚡ Quick Install

git clone https://github.com/TheRemyyy/apex-compiler.git
cd apex-compiler
cargo build --release

Add target/release to your PATH.

🧪 Example Test Scripts

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

📁 Quick Start: Multi-File Project

# 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

Java-Style Namespaces

// 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;
}

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on how to get started.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ and Rust

About

Apex is a modern systems programming language that combines the safety of Rust with the expressiveness of modern high-level languages

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors