diff --git a/acvm-repo/README.md b/acvm-repo/README.md index 96353252f27..3d84be7fa8e 100644 --- a/acvm-repo/README.md +++ b/acvm-repo/README.md @@ -1,20 +1,26 @@ -# ACIR - Abstract Circuit Intermediate Representation +## Project Structure -ACIR is an NP complete language that generalizes R1CS and arithmetic circuits while not losing proving system specific optimizations through the use of black box functions. +This folder is organized into several key components: -# ACVM - Abstract Circuit Virtual Machine +- `acir/` - Definition and implementation of ACIR +- `acvm/` - Implementation of ACVM that executes ACIR +- `brillig/` - Definition and implementation of unconstrained Brillig opcodes +- `brillig_vm/` - Implementation of Brillig VM that executes Brillig -This can be seen as the ACIR compiler. It will take an ACIR instance and convert it to the format required -by a particular proving system to create a proof. +Click into each folder to learn more from their READMEs. -# How to add a new crate to the workspace +## Development -- Create the new crate with the current version of the other crates. -- In root `Cargo.toml`, add the new crate to the workspace members list. -- If you want to import it from multiple packages, you can add it as a dependency in the root `Cargo.toml`. -- In `release-please-config.json`: - - Add a package entry - - Add the crate name to the `linked-versions` plugin list - - If you added the new crate as a dependency in the root `Cargo.toml`, add it to the extra-files of the root package. -- In `.release-please-manifest.json`, add the new crate with the same version of the others. -- In [publish.yml](.github/workflows/publish.yml), add the new crate to the `publish` job after its dependencies. +### Adding a New Crate + +To add a new crate to the workspace: + +1. Create the new crate with the current version of other crates +2. In root `Cargo.toml`, add the new crate to the workspace members list +3. If you want to import it in other noir-lang packages, add it as a dependency in the root `Cargo.toml` +4. Update `release-please-config.json`: + - Add a package entry + - Add the crate name to the `linked-versions` plugin list + - If added as a dependency in the root `Cargo.toml`, add it to the extra-files of the root package +5. Update `.release-please-manifest.json` with the new crate at the same versioning number as others +6. Update [publish.yml](../.github/workflows/publish-acvm.yml) to include the new crate in the `publish` job \ No newline at end of file diff --git a/acvm-repo/acir/README.md b/acvm-repo/acir/README.md index 1b9c125e3e8..69a444c837e 100644 --- a/acvm-repo/acir/README.md +++ b/acvm-repo/acir/README.md @@ -103,4 +103,6 @@ _Note_: Opcodes operate on witnesses, but we will see that some opcodes work on So basically, using witnesses or expressions is equivalent, but the latter can avoid the creation of witness in some cases. -## Brillig +## Documentation + +For detailed documentation, visit . \ No newline at end of file diff --git a/acvm-repo/acvm/README.md b/acvm-repo/acvm/README.md new file mode 100644 index 00000000000..e286b991a80 --- /dev/null +++ b/acvm-repo/acvm/README.md @@ -0,0 +1,14 @@ +# ACVM - Abstract Circuit Virtual Machine + +ACVM (Abstract Circuit Virtual Machine) is the virtual machine that processes and executes Abstract Circuit Intermediate Representation (ACIR) instances. It takes in ACIR instances and user inputs, and generate partial witnesses for proving backends to create proofs with. + +## Components + +The ACVM crate is organized into several key modules: + +- `compiler/` - Circuit compilation and optimization +- `pwg/` - Partial witness generation + +## Documentation + +For detailed documentation, visit . \ No newline at end of file diff --git a/acvm-repo/brillig/README.md b/acvm-repo/brillig/README.md index b68d21bc7cd..b74c1b9286c 100644 --- a/acvm-repo/brillig/README.md +++ b/acvm-repo/brillig/README.md @@ -267,3 +267,7 @@ Blockchain --- Another use case for Brillig bytecode is for public execution of a smart contract in a blockchain environment. In that case, the public function has a Brillig runtime and is compiled into Brillig bytecode. This bytecode can then be executed by a dedicated zkVM, which results into a new state of the blockchain along with a proof that this state is the result of applying the public function. The blockchain can now be updated upon proof verification by the blockchain nodes. + +## Documentation + +For detailed documentation, visit . \ No newline at end of file diff --git a/acvm-repo/brillig_vm/README.md b/acvm-repo/brillig_vm/README.md index d7f1fb1d88d..06d45c5b56b 100644 --- a/acvm-repo/brillig_vm/README.md +++ b/acvm-repo/brillig_vm/README.md @@ -4,4 +4,8 @@ It serves as the runtime environment for Brillig, which is a bytecode format use This VM provides a lightweight execution environment for running computational tasks that may be difficult or inefficient to express directly in circuit constraints. This enables Noir programs to perform complex computations outside of the constraint system while still being able to interact with constrained code. -The VM supports various operations including arithmetic operations over fields and integers, memory management, conditional execution, and foreign function calls that can interact with external systems. The VM processes opcodes sequentially, manages memory, and handles control flow, providing the foundation for executing Brillig bytecode generated from Noir programs. \ No newline at end of file +The VM supports various operations including arithmetic operations over fields and integers, memory management, conditional execution, and foreign function calls that can interact with external systems. The VM processes opcodes sequentially, manages memory, and handles control flow, providing the foundation for executing Brillig bytecode generated from Noir programs. + +## Documentation + +For detailed documentation, visit . \ No newline at end of file