Skip to content
forked from risc0/zirgen

Zirgen compiler and RISC Zero circuits

License

Notifications You must be signed in to change notification settings

Veridise/zirgen

 
 

Repository files navigation

Zirgen Circuit Compiler

Zirgen is a compiler for a domain-specific language, also called "zirgen", which creates arithmetic circuits for the RISC Zero proof system.

For the most part, users of RISC Zero should be writing their zkApps in Rust and using our RISC-V zkVM rather than building them directly in Zirgen. Sometimes, however, it is necessary or desirable to write parts of an application as an arithmetic circuit to integrate directly with our proof system and achieve better performance. In fact, we have an upcoming version of the zkVM circuit written in Zirgen! Zirgen will make it possible to build accelerators for important parts of your applications, or even to build entire other VMs that integrate into the RISC Zero ecosystem through proof composition. With that said, it's still a work in progress and has quite a few rough edges.

Getting Started

Language Overview

Included circuits

Circom integration

We also have an integration with Circom in the works -- this will make it possible to generate recursion circuit programs that verify witnesses for arbitrary Circom circuits. This can be found here.

graph TD;
    A[Zirgen] --> B[Zirgen Compiler]
    C[Circom] --> B
    B --> D[Rust code]
    B --> E[C++ code]
    B --> F[Recursion VM predicates]
Loading

About

Zirgen compiler and RISC Zero circuits

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 53.2%
  • MLIR 40.4%
  • Starlark 2.9%
  • Rust 2.1%
  • Circom 0.5%
  • Cuda 0.2%
  • Other 0.7%