Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add circuits to cairo 1 README #1890

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cairo1-run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Once you are inside the `./cairo1-run` folder, use the CLI with the following co
To install the required dependencies(cairo corelib) run

```bash
make deps
make deps
```

Now that you have the dependencies necessary to run the tests, you can run:
Expand All @@ -19,7 +19,7 @@ make test
To execute a Cairo 1 program (either as Cairo 1 source file or Sierra)

```bash
cargo run ../cairo_programs/cairo-1-programs/fibonacci.cairo
cargo run ../cairo_programs/cairo-1-programs/fibonacci.cairo
```

Arguments to generate the trace and memory files
Expand All @@ -44,7 +44,7 @@ cargo run ../cairo_programs/cairo-1-programs/with_input/array_input_sum.cairo --
To execute all the cairo 1 programs inside `../cairo_programs/cairo-1-programs/` and generate the corresponding trace and the memory files

```bash
make run
make run
```

## CLI argument list
Expand All @@ -71,6 +71,10 @@ The cairo1-run cli supports the following optional arguments:

* `--append_return_values`: Adds extra instructions to the program in order to append the return and input values to the output builtin's segment. This is the default behaviour for proof_mode. Only allows `Array<felt252>` as return and input value.

## Running circuits

Circuits in cairo 1 require to enable the `mod_builtin` feature in order for the `AddMod`, `MulMod` and `RangeCheck96` builtins to be taken into account.

# Running scarb projects

As cairo1-run skips gas checks when running, you will need to add the following to your Scarb.toml to ensure that compilation is done without adding gas checks:
Expand All @@ -86,7 +90,7 @@ Then run the compiled project's sierra file located at `project_name/target/proj

Example:
```bash
cargo run path-to-project/target/project_name.sierra.json
cargo run path-to-project/target/project_name.sierra.json
```

# Known bugs & issues
Expand Down
Binary file removed cairo1-run/trace
Binary file not shown.
Loading