astra-lang.org

Getting started

From download to native binary
in five minutes.

Since v0.9.1-alpha, prebuilt astra and mifa binaries ship for Linux, macOS (Intel and Apple Silicon), and Windows — together with the runnable showcase examples.

Step 0Prerequisites

  • LLVM toolsllc on your PATH (brew install llvm on macOS)
  • A C compilerclang or gcc, for linking the small runtime

The compiler invokes llc and clang to turn LLVM IR into your native executable. Primary tested platform is macOS ARM64; the Linux/Windows/Intel-macOS release binaries are CI-built.

Step 1Download a release

Grab the archive for your platform from the releases pagelinux-x64, macos-x64, macos-arm64, or windows-x64. Each contains the astra compiler and the mifa package manager. Unpack, put them on your PATH, done.

Where's the source? The compiler's repository is private while the core hardens; it opens at v1.0-beta. Everything runnable — binaries, examples, issue tracker — is public in astra-releases. For early source access, get in touch.

Step 2Write and verify a program

hello.astra
fn main() -> int {
    let name = "world";
    print("Hello, ${name}!");
    return 0;
}

verify typechecks without generating code — it's the fast feedback path, for humans and agents alike:

$ astra verify hello.astra
Verification passed

$ astra verify --error-format=json hello.astra
{"success": true, "diagnostics": []}

Step 3Compile and run natively

$ astra compile hello.astra --output hello
$ ./hello
Hello, world!

The output is a real machine-code executable — no interpreter, no VM, no Python on the target machine.

Step 4Explore interactively

$ astra repl
astra> let x = 21;
astra> print(x * 2);
42
astra> :quit

The REPL (alpha) accumulates your session and re-compiles the whole program on each entry — errors roll back cleanly. :help, :show, :reset, :quit.

Step 5Start a real project with Mifa

$ mifa init myapp
$ cd myapp
$ mifa verify
$ mifa lock     # reproducible astra.lock
$ mifa run

See the Mifa page for manifests, path dependencies, and the lockfile contract.

NextWhere to go from here

Language tour

Structs, enums, Result, closures, generics, dyn — with runnable snippets.

For agents

The JSON diagnostics contract and error-code catalog for integrating Astra into an agent loop.

Showcase examples

examples/showcase/ ships with the releases — every one is compiled, executed, and output-asserted in the compiler's CI.

What works today

The honest feature matrix, so you know what to rely on.