# Lab preparation

Let's go through the steps to get started in circuit creation. We just need to create a rust repo (don't forget to ensure you are using the nightly toolchain) and add the relevant dependencies to the `cargo.toml` file

1. Open your code editor and go to folder where you will want to create your repo, then in the terminal you can run `cargo init repo_name`
2. Now you will have a repo with a `cargo.toml` file and a src folder (with a main file in it)
3. In the `cargo.toml` file, copy in the dependencies and dev-dependencies in the code block below
4. Now your repo is ready to go, all other relevant code will be provided along the way in the labs

***

These dependencies may change over time due to breaking changes - if they do not work then check the [github](https://github.com/EDGDrummond/EF-grant/blob/main/halo2/Cargo.toml) tutorial code to see if they match. If they don't match then try the dependencies from github (if those don't work then you might have to debug yourself...)

Another thing to check is the nightly version you are using, there is a rust-toolchain [file](https://github.com/EDGDrummond/EF-grant/blob/main/rust-toolchain) in the repo too.

```
[dependencies]
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2022_10_22"   }
halo2wrong = { git = "https://github.com/privacy-scaling-explorations/halo2wrong.git", default-features = false, tag = "v2022_10_22"  }
ecdsa = { git = "https://github.com/privacy-scaling-explorations/halo2wrong.git", tag = "v2022_10_22"  }
ecc = { git = "https://github.com/privacy-scaling-explorations/halo2wrong.git", tag = "v2022_10_22"  }
integer = { git = "https://github.com/privacy-scaling-explorations/halo2wrong.git", tag = "v2022_10_22"  }
maingate = { git = "https://github.com/privacy-scaling-explorations/halo2wrong.git", tag = "v2022_10_22"  }
zkevm-circuits = { git = "https://github.com/EDGDrummond/zkevm-circuits.git", rev="1e8637233bb53c12f1b12937e73f863c444e4e9e" }
rayon = "1.5.1"
rand_core = { version = "0.6", default-features = false }
pairing = { git = 'https://github.com/EDGDrummond/pairing', package = "pairing_bn256"} 
num-integer = "0.1.45"
num-bigint = "0.4.3"
num-traits = "0.2.15"
group = "0.12.0"
rand = "0.8.5"
ff = "0.12"

[dev-dependencies]
assert_matches = "1.5"
criterion = "0.3"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://erroldrummond.gitbook.io/halo2-tutorial/lab-preparation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
