How to use?

To generate trace you need two things:

  1. programFile - compiled Cairo program in JSON format for cairo0 or SIERRA file for cairo1.

  2. (optional) inputFile - depending on Cairo and VM version:

    • Cairo1 - text file containing input array: e.g. [1 [2 3 4]] as described in Rust VM documentation. Keep in mind that your cairo main function should have signature fn main(input: Array<felt252>) -> Array<felt252>.
    • Cairo0, Python VM - JSON file representing the (private) input of the program (as in cairo-run of cairo-lang)
    • Cairo0, Rust VM - no support

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

Cairo1 on the other hand only works with Rust VM, but fortunately it supports inputs.