A native binary in five minutes.
Prebuilt astra and mifa binaries for Linux,
macOS (Intel and Apple Silicon) and Windows ship as
v0.13.11-alpha (early access; public
downloads follow). These are the steps to follow with them.
Download a release
v0.13.11-alpha is available to early-access testers: see the downloads page. Grab the archive for
your platform, linux-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. Binaries and examples arrive with the first public release. For early access, get in touch.
Write and verify a program
Write a program and check it in milliseconds, before anything is built.
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": []}
Prerequisites
Only native builds need these. astra run and astra verify work without them.
- LLVM tools:
llcon your PATH (brew install llvmon macOS) - A C compiler:
clangorgcc, 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 and Intel-macOS builds come from CI.
Compile and run natively
Once it verifies, one command turns it into a real executable.
$ 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.
Explore interactively
The REPL lets you try the language a line at a time.
$ 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.
Start a real project with Mifa
Mifa turns a folder into a project with a manifest and a reproducible lockfile.
$ mifa init myapp # creates myapp/ with astra.toml and src/
$ cd myapp
$ mifa verify
$ mifa lock # reproducible astra.lock
$ mifa run
See the Mifa page for manifests, path dependencies, and the lockfile contract.
Since v0.10: mifa init myapp creates
the myapp/ folder itself, mifa add lib --path
../lib makes another local package importable, and a program
can span several files with import: see the
language tour.
Where to go from here
Pick your next page by what you want to do.
Structs, enums, Result, closures, generics, dyn, with runnable snippets.
The JSON diagnostics contract and error-code catalogue for integrating Astra into an agent loop.
examples/showcase/ ships with the first public release, every one is compiled, executed, and output-asserted in the compiler's CI.
The honest feature matrix, so you know what to rely on.