Astralang

Verify,then run.

Astra is a compiled language for code that AI agents write: as easy to read as Python, as safe and fast as Rust. The compiler answers in JSON and repairs what it can before anything runs.

v0.11.2-alpha for Linux, macOS and Windows. 712 tests; 750 on main.

Every star is a feature: Astra on the globe, Mifa on its moon. Drag to turn it. Pick a magnitude to light up its stars.

Errors are data.

$ astra verify --error-format=json bad.astra
{
  "success": false,
  "diagnostics": [{
    "error_code": "E0002",
    "message": "Undefined variable 'totl';
                did you mean 'total'?",
    "line": 4, "column": 9,
    "fix": { "edits": [{
      "line": 4, "column": 9,
      "end_line": 4, "end_column": 13,
      "text": "total"
    }] }
  }]
}

astra verify Every error has a stable code, a line and a column, and a fix when the repair is certain.

Read the agent interface
$ astra fix bad.astra
Applied 1 fix(es) to bad.astra
Verification passed

fn main() -> int:
    let total = 0
    for i in 1..10:
        total = total + i
    print("sum = ${total}")
    return 0

$ astra build bad.astra -o sum && ./sum
sum = 45

astra fix Applies the edits and checks again. No model call for these errors. On main, in the next release.

What ships next

One loop, no retries.

An agent writes code. Astra checks it, fixes what it can, and only then builds a native binary. The model is asked again only about what the compiler could not repair.

Write

The agent writes bad.astrayour model

Check

astra verify, answered in JSONunder 100 ms

Every error: code, line, columnE0001 to E0022

Repair

astra fix applies certain editsno model call

The model repairs the restonly if needed

Build and run

LLVM IR to a native binary62 to 74 ms

A 5M-iteration loop runs7 to 9 ms

Compile and run: at most 83 msPython alone: about 475 ms

What Astra and Mifa do

Measured, not promised.

1.3 MB

Peak memory for a helper called a million times that builds a struct, a list and a tuple. It was 231 MB before memory was freed on every exit (on main).

750

tests pass on main, none ignored. v0.11.2 shipped with 712.

55 of 55

release checks pass on main, on both engines. The record

A hand-coloured 1750 star chart from John Bevis's celestial atlas: the constellations Libra and Scorpius drawn over a grid of stars.

Where Astra stands

What is released, what is on main for the next release, and what comes after. The same stars light up on the globe above.

On main, next release

  • Every type error has a line main
  • Machine fixes and astra fix main
  • Memory freed on every exit main
  • A 55-check release suite main

Released

  • Trait bounds checked at the call v0.11.2
  • Loops no longer leak memory v0.11.2
  • Binaries compile on their own v0.11.1
  • Value semantics and mut parameters v0.11.0
  • Nominal traits and trait bounds v0.11.0
  • Indentation syntax and astra fmt v0.11.0
  • The interpreter, at native parity v0.10.0
  • Modules, I/O and capabilities v0.10.0
  • The LLVM-IR backend v0.8.0

Next

  • Fixes for match arms and traits next
  • @derive(Eq) and default methods next
  • Map, Set and comprehensions next
  • Generic structs next

Astra is an alpha. The core language compiles and runs natively with every test green, but it is not yet a production language, a package ecosystem or a memory-safe systems language.

Planned: tool and agent keywords, Python interop, WASM and GPU targets, a hosted Mifa registry.
The source opens at v1.0-beta. The full tracker

Install the alpha, verify a program and build it in about two minutes.

Start