Aela Programming Language

Aela is a compiled systems language. It checks arithmetic, makes borrowing explicit, treats errors as values, and runs async and parallel code safely. Its compiler is written in Aela, uses no C, and makes native programs for Linux, macOS, Windows and bare-metal AArch64.

6 Reasons to Use Aela

  1. 01

    A small language

    Aela has one clear way to do most things. There are no macros, no inheritance, no exceptions, no overloading and no implicit conversions. Code reads the same from one author to the next, so it is easy to review.

  2. 02

    Formal verification, built in

    Write what a function needs and what it promises with #requires and #ensures, and what a loop keeps true with #invariant. aec --verify proves them, and proves that every sum, index and cast stays in range. No extra tools are needed.

  3. 03

    Async you can trace and check

    async and await are part of the language. The compiler proves that parallel tasks cannot race, and every task you start must be awaited or detached. When async code fails, the report shows the chain of tasks that were waiting on it.

  4. 04

    A large standard library

    HTTP and TLS, JSON, regular expressions, compression, crypto, a terminal UI kit and more. It works on bare metal, inside a C program, and on Linux, macOS and Windows. On bare metal, a module that needs an operating system is refused when you compile.

  5. 05

    No hidden control flow

    There are no exceptions, no unwinding and no operator overloading. Every error a function can return is in its signature, and the caller must handle it. Every place where async code can pause is marked with await.

  6. 06

    A toolchain you can verify

    The compiler is built from a small seed of 8,600 lines of assembly. Each release is built two separate ways, and both must give the same result. You can build the compiler yourself from its assembly source, and every program records what built it (aec provenance).

Hello Verification Parallelism Failures Regions HTTPS
hello.ae
1// Build and run it: aec hello.ae && ./hello
2fn main() -> i32 {
3 let name = "world";
4 println("Hello, \(name)!");
5 return 0;
6}

More About the Language

Download Aela 2.2.1

The compiler, the runtime and the standard library, under the MIT license. To build programs you also need an assembler and a linker: as and ld on Linux, clang on macOS, or LLVM's clang and lld-link on Windows, where aec writes the assembly and you link it.

SHA256SUMS · its signature

install.sh
1# macOS and Linux: unpack the archive and run its install script.
2# It puts aec in ~/.local/bin (or the folder you give it).
3tar xzf aela-2.2.1-macos-arm64.tar.gz
4sh aela-2.2.1-macos-arm64/install.sh
5aec --version
6
7# Windows, in PowerShell: unzip the archive and run its install script.
8# powershell -ExecutionPolicy Bypass -File aela-2.2.1-windows-x64\install.ps1
9
10# The docs are in the compiler.
11aec docs closures # search the language docs
12aec doc std/http # show a standard library module
13aec explain E0408 # explain an error code

Each package has a SHA256SUMS file and a signature, which you can check with ssh-keygen -Y verify -n aela-release. The assembly package has the compiler for every target as source code, so you can build it yourself instead of trusting our binary.

Highlighting, errors as you type, and go to definition in VS Code, Neovim, Vim and IntelliJ, through aec lsp. Builds and errors in Xcode.