Skip to content

Commit 81988d6

Browse files
GarmashAlexJulianGCalderongabrielbosio
committed
docs: add --run_from_cairo_pie documentation for Cairo 0 and Cairo 1 (#2077)
* docs: add --run_from_cairo_pie flag usage documentation for Cairo 0 * docs: add --run_from_cairo_pie flag usage documentation for Cairo 1 * Update README.md Co-authored-by: Julian Gonzalez Calderon <[email protected]> * Update README.md * Update README.md * Update README.md Co-authored-by: Julian Gonzalez Calderon <[email protected]> * Update README.md Co-authored-by: Gabriel Bosio <[email protected]> * Update README.md Co-authored-by: Julian Gonzalez Calderon <[email protected]> --------- Co-authored-by: Julian Gonzalez Calderon <[email protected]> Co-authored-by: Gabriel Bosio <[email protected]>
1 parent 5df9a98 commit 81988d6

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,18 @@ The cairo-vm-cli supports the following optional arguments:
180180

181181
- `--allow_missing_builtins`: Disables the check that all builtins used by the program need to be included in the selected layout. Enabled by default when in proof_mode.
182182

183-
- `run_from_cairo_pie`: Runs a Cairo PIE instead of a compiled json file. The name of the file will be the first argument received by the CLI (as if it were to run a normal compiled program). Can only be used if proof_mode is not enabled.
183+
- `--run_from_cairo_pie`: Runs a Cairo PIE instead of a compiled json file. The name of the file will be the first argument received by the CLI (as if it were to run a normal compiled program). Can only be used if proof_mode is not enabled.
184+
185+
```bash
186+
# First, compile a Cairo 0 program and run it to generate a Cairo PIE file
187+
cairo-compile cairo_programs/print.cairo --output cairo_programs/print_compiled.json
188+
target/release/cairo-vm-cli cairo_programs/print_compiled.json --layout all_cairo --cairo_pie_output print.pie
189+
190+
# Then, run the program from the Cairo PIE file
191+
target/release/cairo-vm-cli print.pie --run_from_cairo_pie --layout all_cairo --print_output
192+
```
193+
194+
Note: When using the `--run_from_cairo_pie` flag, the layout specified must be the same as the one used to create the PIE file, otherwise you may encounter compatibility issues.
184195

185196
- `cairo_layout_params_file`: Only used with dynamic layout. Receives the name of a json file with the dynamic layout parameters.
186197

0 commit comments

Comments
 (0)