Skip to content

flyfishxu/aurora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AuroraLang

AuroraLang Logo

A Modern, High-Performance Programming Language Built on LLVM

AuroraLang is a statically-typed systems programming language that combines the simplicity of modern languages (Kotlin, Swift) with the raw performance of LLVM-compiled native code. Write clean, intuitive code that runs at C++ speeds.


🎯 Why AuroraLang?

Our goal is: "Write like Kotlin, Run like C++"

✨ Modern, Clean Syntax - No semicolons, intuitive keywords, readable code
⚑ Native Performance - LLVM-optimized machine code, zero-cost abstractions
πŸ›‘οΈ Memory Safety - Null safety, optional types, bounds checking
πŸš€ Fast Compilation - LLVM JIT for instant feedback, ahead-of-time for production
πŸ”§ Simple Yet Powerful - Easy to learn, powerful enough for systems programming
🌐 True Cross-Platform - Linux, macOS, Windows - compile once, run anywhere


πŸ“¦ Installation & Usage

Prerequisites

  • LLVM 14+ (tested with LLVM 21)
  • CMake 3.20+
  • C++17 compatible compiler

macOS (Homebrew)

# Install dependencies
brew install llvm cmake

# Clone and build
git clone https://github.com/flyfishxu/AuroraLang.git
cd AuroraLang
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix llvm)"
make

# Run your first program
./aurora ../tests/basic/exitCode.aur

Linux

# Install dependencies (Ubuntu/Debian)
sudo apt-get install llvm-dev cmake build-essential

# Clone and build
git clone https://github.com/flyfishxu/AuroraLang.git
cd AuroraLang
mkdir build && cd build
cmake ..
make

# Run your first program
./aurora ../tests/basic/exitCode.aur

Create Distribution (Optional)

Create a portable, relocatable distribution:

cd build
make dist
cd ../dist
./bin/aurora myprogram.aur

🎯 Quick Start

Hello, World!

fn main() -> int {
    printd(42)  # Built-in function, no import needed!
    return 0
}

Variables and Types

fn demo() -> void {
    # Type inference
    let x = 42          # int
    let y = 3.14        # double
    let flag = true     # bool
    
    # Explicit types
    let name: string = "Aurora"
    let value: int? = null  # Optional type
    
    # Mutable variables
    var counter = 0
    counter = counter + 1
}

Control Flow

fn fibonacci(n: int) -> int {
    if n <= 1 {
        return n
    }
    
    var a = 0
    var b = 1
    
    for i in 2..n {
        let temp = a + b
        a = b
        b = temp
    }
    
    return b
}

Package System

// File: com/mycompany/math/Functions.aur
package com.mycompany.math

fn factorial(n: int) -> int {
    if n <= 1 {
        return 1
    }
    return n * factorial(n - 1)
}
// File: Main.aur
package myapp

import com.mycompany.math.Functions

fn main() -> int {
    printd(factorial(5))  // Prints: 120
    return 0
}

βš™οΈ Advanced Configuration

Environment Variables

Configure AuroraLang behavior with environment variables:

# Set custom sysroot location
export AURORA_HOME=/usr/local

# Add custom module search paths
export AURORA_MODULE_PATH=/path/to/modules:/another/path

./build/aurora myprogram.aur

Sysroot Resolution

The compiler locates standard library and runtime using this priority order:

  1. --sysroot <path> - Command line argument (highest priority)
  2. AURORA_HOME - Environment variable
  3. Executable path - Relative to bin/../ (auto-detected)
  4. Compile-time path - Default build location
# Use auto-detected sysroot (recommended)
./build/aurora myprogram.aur

# Override with custom location
./build/aurora --sysroot /opt/aurora myprogram.aur

🌟 Vision

AuroraLang is in active development with a clear mission: build the language that should exist - combining modern syntax with native performance.

Core Principles

  • Simplicity + Power - Clean syntax with zero-cost abstractions (write like Kotlin, run like C++)
  • Safety Without Overhead - Compile-time guarantees, no GC pauses
  • Developer Experience - Fast compilation, clear errors, intuitive tooling

Designed For

  • High-performance systems - Backends, microservices, game engines
  • Cross-platform development - No VM, no runtime dependencies
  • Production workloads - Real-world use from day one, not a toy language

πŸ“š Documentation

Getting Started

Language Reference

Development


🀝 Contributing

We welcome contributions! AuroraLang is actively seeking:

  • Core language features (see roadmap)
  • Standard library implementations
  • Documentation and examples
  • Bug reports and fixes
  • Performance optimizations

See Developer Guide for contribution guidelines and ROADMAP for priority areas.


πŸ“„ License

MIT License - See LICENSE for details.


Built with ❀️ and LLVM | GitHub | Documentation

About

The Aurora Programming Language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published