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.13.11-alpha for macOS and WebAssembly; Linux and Windows follow. 907 tests, none ignored.

Every star is a feature: Astra on the globe, Mifa on its moon. Drag either one 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. New in v0.12.

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 (v0.12).

907

tests pass in v0.13.11, none ignored.

69 of 69

release checks pass in v0.13.11, 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 and what comes after. The same stars light up on the globe above.

Released

  • Functions as values (map, filter, fold, fn(..) parameters), sized integers and as v0.13.11-alpha
  • Multi-field enum variants, struct / tuple / range patterns, generic structs v0.13.10-alpha
  • @derive(Eq, Show): compare and print structs v0.13.9-alpha
  • Python habits: and/or/not, if as a value, unwrap; trait default methods v0.13.8-alpha
  • elif, default arguments and sqrt (Linux fixes in v0.13.7) v0.13.6-alpha
  • Eight correctness fixes, found by probe programs v0.13.5-alpha
  • C FFI + static package registry v0.13.3-alpha
  • Maps, sorting, git dependencies and workspaces v0.13.2
  • Everyday string methods: for c in s, replace v0.13.1
  • Any AI agent can use it: astra mcp v0.13.0
  • Runs in the browser: WebAssembly v0.13.0
  • Real programs checked against Python v0.12.2
  • Native builds on Windows v0.12.1
  • Every type error has a line v0.12.0
  • Machine fixes and astra fix v0.12.0
  • Memory freed on every exit v0.12.0
  • A 55-check release suite v0.12.0
  • 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
  • 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