diff --git a/README.md b/README.md new file mode 100644 index 00000000..adc96098 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# 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](zirgen/docs/01_Getting_Started.md) + +[Language Overview](zirgen/docs/02_Conceptual_Overview.md) + +## Included circuits + +* [The recursion circuit](/zirgen/circuit/recursion/) +* [The RISC-V zkVM](/zirgen/circuit/rv32im/) + +## 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](/zirgen/compiler/tools/zirgen-r1cs.cpp). + +```mermaid +graph TD; + A[Zirgen] --> B[Zirgen Compiler] + C[Circom] --> B + B --> D[Rust code] + B --> E[C++ code] + B --> F[Recursion VM predicates] +``` diff --git a/zirgen/docs/01_Getting_Started.md b/zirgen/docs/01_Getting_Started.md index d512fd5a..cc49e838 100644 --- a/zirgen/docs/01_Getting_Started.md +++ b/zirgen/docs/01_Getting_Started.md @@ -1,10 +1,10 @@ # Getting Started -We don't currently release Zirgen in any form, so it's only available through -this repository. Assuming you've cloned and built things from this repo before, -building Zirgen with Bazel is simple with the following command. Note, though, -that this isn't strictly necessary, and that Bazel will automatically (re)build -Zirgen if you use it to invoke the tests as well. +We don't currently release Zirgen in any packaged form, so it's only available +through this repository. Assuming you've cloned and built things from this repo +before, building Zirgen with Bazel is simple with the following command. Note, +though, that this isn't strictly necessary, and that Bazel will automatically +(re)build Zirgen if you use it to invoke the tests as well. ``` bazel build //zirgen/dsl:zirgen diff --git a/zirgen/docs/README.md b/zirgen/docs/README.md index 827fb78f..e415c051 100644 --- a/zirgen/docs/README.md +++ b/zirgen/docs/README.md @@ -3,17 +3,8 @@ ## Introduction The Zirgen circuit language is a domain-specific language for writing 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. However, sometimes 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, our zkVM -itself is a circuit written in Zirgen! Zirgen makes 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. -If that sounds like your goal, read on! - -So, what kinds of things can you build with Zirgen? +circuits for the RISC Zero proof system. What kinds of things can you build +with Zirgen? * zk accelerators (hashing, bigint operations, cryptographic primitives) * zkVMs * recursion circuits @@ -22,5 +13,8 @@ So, what kinds of things can you build with Zirgen? Table of Contents: 1. [Getting Started](01_Getting_Started.md) 2. [Basic Concepts](02_Conceptual_Overview.md) +3. [Building a Fibonacci Circuit](03_Building_a_Fibonacci_Circuit.md) +4. [Components](04_Components.md) +5. [Built-in Components](A1_Builtin_Components.md) [Next](01_Getting_Started.md)