Skip to content

zirco-lang/zrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,303 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

Zirco banner

Bare metal power, modern clarity.

Homepage | Playground

Alt

About Zirco

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.

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

πŸ’»
Emirhan DAY
Emirhan DAY

πŸ’»
Ali Mansouri
Ali Mansouri

πŸ’»
Cory Borek
Cory Borek

πŸ€” πŸ› πŸ’» πŸ“¦ 🚧 πŸ”Œ
ddawn-ll
ddawn-ll

πŸ–‹ 🎨
ImTheShrub
ImTheShrub

πŸ€”
Yam C Borodetsky
Yam C Borodetsky

πŸ“–
EpicVon2468
EpicVon2468

πŸ› πŸ““
nevakrien
nevakrien

πŸ€”

About

The official Zirco compiler

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages