Skip to content

Commit

Permalink
Add circuits to cairo 1 README (#1890)
Browse files Browse the repository at this point in the history
* update readme cairo1

* fix

* Update cairo1-run/README.md

Co-authored-by: Julian Gonzalez Calderon <[email protected]>

* Update cairo1-run/README.md

Co-authored-by: Gabriel Bosio <[email protected]>

---------

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Gabriel Bosio <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent d2c056e commit d90bcc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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.

0 comments on commit d90bcc8

Please sign in to comment.