Skip to content

lambdaclass/austral.rs

Repository files navigation

austral

An implementation of the Austral language compiler in Rust. Austral is a new systems programming language. It uses linear types to provide memory safety and capability-secure code.

Requisites

  • LLVM 17 with MLIR support.

Building

First make sure you have a working installation of LLVM with MLIR support. If you are using a Mac you can run:

brew install llvm@17

It will install all the required dependencies. To compile the project you need to first export some environment variables. Look at the env-macos.sh script to see what is needed. Then if you are in using Mac:

source env-macos.sh

After that, cargo build --all should work.

Running the CLI

Run:

To compile an Austral file:

cd bin/austral_bin
cargo r -- <module_file>
cd bin/austral_bin
cargo r -- ../../programs/examples/hello_world.aum
./a.out
# prints Hello world!

You can also print the parsed AST and get the MLIR and LLVM representation of the program.

To see all the available options run:

cargo r -- --help

Status

  • Lexer
  • Parser
  • Compilation Passes
  • Type checker
  • Code generation of simple programs
  • Full code generation

Docs

OCaml code analysis

Resources

About

An implementation of the Austral language compiler in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages