Skip to content

neotheprogramist/cairo-args-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cairo Args Runner

Overview

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.

Examples

You can run all examples with:

./run.sh

Here are examples for running different Cairo programs:

Firstly build examples with:

scarb build

And then build the runner with:

cargo build --release

e1_struct_with_values

echo "[1, 2, 3]" | cargo run --release -- target/dev/e1_struct_with_values.sierra.json

The output should be [1, 2, 3].

e2_arrays

echo "[[1, 9, 1], 7, []]" | cargo run --release -- target/dev/e2_arrays.sierra.json

The output should be [11, 7, 0].

e3_struct_with_array

echo "[[1, 2, 3]]" | cargo run --release -- target/dev/e3_struct_with_array.sierra.json

The output should be [6].

e4_struct_with_arrays

echo "[[1, 2, 3], [1, 3, 9]]" | cargo run --release -- target/dev/e4_struct_with_arrays.sierra.json

The output should be [6, 13].

About

Run Cairo 1 programs with arguments

Resources

License

Stars

Watchers

Forks

Packages

No packages published