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 our comprehensive Getting Started Guide for step-by-step instructions on:
- Installing prerequisites
- Building the compiler
- Writing and compiling your first program
- Using compiler options and output formats
- 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 20 with Polly + other dependencies (Ubuntu/Debian) sudo apt-get update sudo apt-get install -y llvm-20 llvm-20-dev libpolly-20-dev clang-20 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 --emit object -o hello.o hello.zr clang -o hello hello.o -lc ./hello
For detailed instructions and troubleshooting, see the Getting Started Guide.
For a comprehensive guide to the Zirco language syntax, semantics, and behavior, see the Language Specification.
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 --emit object -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. As of now,
all internal libraries and zrc is given version 0.1.0 until we begin maintaining stability.
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 GPL 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:
