Get Started

From zero to compiled ARIA-IR in under ten minutes.

Prerequisites

Java 11+ the JVM runtime
Clojure CLI install guide
Git for cloning the repo
gcc for the C backend (compile + run)

Install

Download a prebuilt JAR. Requires Java 11+ but not the Clojure CLI.

# Download the latest release
curl -LO https://github.com/jhavera/aria-clj/releases/latest/download/aria-clj.jar
# Type-check an ARIA-IR file
java -jar aria-clj.jar examples/fibonacci.aria --check

# Emit C to stdout
java -jar aria-clj.jar examples/fibonacci.aria --emit-c

# Full pipeline: parse, check, compile, execute
java -jar aria-clj.jar examples/fibonacci.aria --run

Or build the uberjar yourself: clj -T:build uber

Hello World

Create a file called hello.aria:

(module "hello"

  (func $main
    (result i32)
    (effects io)
    (intent "Print hello world")
    (print "Hello, world!\n")
    (return 0))

  (export $main))

Compile and run:

$ clj -M:run hello.aria --run
Hello, world!

Troubleshooting

gcc not found

The --run and --emit-c flags require gcc. On macOS, install Xcode Command Line Tools: xcode-select --install. On Linux: apt install gcc or equivalent.

Clojure CLI not found

Follow the official install guide. On macOS: brew install clojure/tools/clojure.

Something else?

Open an issue on GitHub or ask in Discussions.