Zirco is an unstable work-in-progress compiled programming language focusing on its clean, expressive syntax without sacrificing clarity: no hidden memory allocations, no macros, just fast, explicit code.
It started out as (and still is) a hobby project for me to learn more about the world of compiler development, so there are no real promises for Zirco's real production usability. However, it also serves as a well-implemented reference for designing a compiler.
Zirco can be installed via the Zircon toolchain installer. For more information, visit the Zircon GitHub repository.
If you aim to contribute to the Zirco compiler itself, please follow the instructions below.
New to Zirco? Check out the Zirco Book for step-by-step instructions on:
- Installing the compiler
- Writing and compiling your first program
- Troubleshooting common issues
For experienced developers who want to get running quickly:
-
Install prerequisites:
# Rust toolchain (if not already installed) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # LLVM 22 with Polly + other dependencies (Ubuntu/Debian) sudo apt-get update sudo apt-get install -y llvm-22 llvm-22-dev libpolly-22-dev clang-22 build-essential libssl-dev pkg-config libzstd-dev
-
Clone and build:
git clone https://github.com/zirco-lang/zrc cd zrc cargo build -
Install system-wide (optional):
cargo install --path compiler/zrc
-
Compile your first program:
# Create hello.zr with your favorite editor, then: zrc -o hello.o hello.zr clang -o hello hello.o -lc ./hello
For a comprehensive guide to the Zirco language syntax, semantics, and behavior, see the Language Reference.
If you are directly invoking the compiler with cargo, replace zrc with cargo run -- in the below commands.
You can compile a single Zirco file to a .o object with zrc -o main.o main.zr. Otherwise, zrc main.zr will emit LLVM IR. This is soon to change.
For more usage help, refer to zrc --help.
So that Zirco can continue to evolve at a rapid pace, there are NO STABILITY GUARENTEES on the current version of Zirco and zrc.
All internal compiler APIs are VERY unstable and if you integrate them with your own tooling builds may fail
if you update zrc. Zirco code may change semantics or fail to build on a different zrc version.
Contributions to Zirco are welcome! Please read CONTRIBUTING.md for more information on how to contribute to the project.
Zirco is released under the GNU LGPL v3.0. To contact the maintainer, please use issues or a GitHub discussion. For sensitive matters, please email logan@zirco.dev.
If you're curious, here's our test coverage represented as a cool little chart:
