Skip to content
 
 

Repository files navigation

Build Status Coverage Test Status Repo Size open issues open PRs license All Contributors

Zirco banner

A modern programming language focusing on a strong type system and modern syntax

Alt

About Zirco

Zirco is an unstable work-in-progress compiled programming language with the goal of having an extremely strong runtime type system with a focus on the ability to easily represent states of a program.

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.

As of now, Zirco uses a C-like set of semantics with Rusty syntax.

This repository contains the entire Zirco compiler and all of its development work, including language-related proposals.

Toolchain Installation via Zircon

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.

Getting Started

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

Quick Start

For experienced developers who want to get running quickly:

  1. 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
  2. Clone and build:

    git clone https://github.com/zirco-lang/zrc
    cd zrc
    cargo build
  3. Install system-wide (optional):

    cargo install --path compiler/zrc
  4. 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.

Language Specification

For a comprehensive guide to the Zirco language syntax, semantics, and behavior, see the Language Specification.

Usage

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.

A Note on Stability

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.

Contributing

Contributions to Zirco are welcome! Please read CONTRIBUTING.md for more information on how to contribute to the project.

Licence & Contact

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.

Code Coverage

If you're curious, here's our test coverage represented as a cool little chart:

coverage report

Contributors

Logan Devine
Logan Devine

💻 🎨 🤔 🚧
Val
Val

🤔 💻 🐛
charmines
charmines

💻

About

The official Zirco compiler

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages