Cairo Args Runner is a streamlined utility for executing Cairo 1 programs with command-line arguments. It enhances the user experience by enabling direct argument specification in the command line, thus simplifying the execution of Cairo programs.
You can run all examples with:
./run.shHere are examples for running different Cairo programs:
Firstly build examples with:
scarb buildAnd then build the runner with:
cargo build --releaseecho "[1, 2, 3]" | cargo run --release -- target/dev/e1_struct_with_values.sierra.jsonThe output should be [1, 2, 3].
echo "[[1, 9, 1], 7, []]" | cargo run --release -- target/dev/e2_arrays.sierra.jsonThe output should be [11, 7, 0].
echo "[[1, 2, 3]]" | cargo run --release -- target/dev/e3_struct_with_array.sierra.jsonThe output should be [6].
echo "[[1, 2, 3], [1, 3, 9]]" | cargo run --release -- target/dev/e4_struct_with_arrays.sierra.jsonThe output should be [6, 13].