Skip to content

Repository files navigation

The Abra Programming Language

Build Status

Abra is an embeddable scripting language with a strong type system.

Untrusted code can be run in a host program (plugins, game scripts, mods) without worrying about memory/CPU exhaustion or unsafe memory access.

This repository holds the compiler and language tooling.

fn fib(n) {
  if n < 2 {
    return n
  }
  fib(n - 1) + fib(n - 2)
}


println("The first 10 fibonacci numbers are:")
for i in 10 {
  println(fib(i))
}

Installation

Homebrew (macOS / Linux)

brew install --HEAD anandrav/abra/abra

From source

Requires Rust and Cargo.

git clone https://github.com/anandrav/abra.git
cd abra
./scripts/install

Optionally install editor extensions:

./scripts/install --vim      # Vim syntax highlighting
./scripts/install --vscode   # VS Code extension (requires Node 20+)
./scripts/install --intellij # IntelliJ plugin (requires JDK 21)

Documentation

User guide and language reference: https://anandrav.github.io/abra/about.html

License

Abra is distributed under the Mozilla Public License 2.0.

The MPL is a file-level copyleft license: you can use Abra in your own projects (including closed-source, proprietary ones), as long as any modifications made to Abra's source files are released under MPL 2.0. If you ship Abra as part of a product, include the MPL 2.0 license text and a link to this repository in your third-party notices.