> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herodotus.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Trace Generation

> Trace generation is a process of running Cairo program on given inputs and generating `pie.zip` file. Pie represents exact execution of Cairo program and is necessary for proof generation.

### How to use?

To generate a trace, you need two things:

1. `programFile` - compiled Cairo program in JSON format for Cairo0 or a Sierra file for Cairo1.

2. (optional) `inputFile` - supported input format depends on Cairo and VM version:
   * Cairo1 - text file containing an input array, e.g. `[1 [2 3 4]]`, as described in the [Rust VM documentation](https://github.com/lambdaclass/cairo-vm/tree/main/cairo1-run#cli-argument-list). Your Cairo main function should use `fn main(input: Array<felt252>) -> Array<felt252>`.
   * Cairo0, Python VM - JSON file representing program private input (as in `cairo-run` from [cairo-lang](https://github.com/starkware-libs/cairo-lang))
   * Cairo0, Rust VM - not supported

When submitting a Cairo0 program, you can choose between Rust VM and Python VM. Rust VM is much faster and should be used when possible. However, **custom hints, including inputs, are not supported for Rust VM**. If your program requires custom hints, use Python VM.

Cairo1 only works with Rust VM, and input files are supported there.
