Crates.io | cairo-args-runner |
lib.rs | cairo-args-runner |
version | 2.0.1 |
source | src |
created_at | 2023-12-23 17:30:44.595813 |
updated_at | 2024-02-22 19:08:57.767484 |
description | Cairo Args Runner is a utility designed to execute Cairo programs with arguments directly from the command line. |
homepage | |
repository | https://github.com/neotheprogramist/cairo-args-runner |
max_upload_size | |
id | 1079213 |
size | 368,102 |
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.
To use Cairo Args Runner, you need to:
scarb build
.You can also install this crate directly using the cargo install
command.
To do this, run the following command in your terminal:
cargo install cairo-args-runner
Run a main
function from the complex
package located in examples/complex
,
passing [[1, 2, 4, 8, 16], [1, 2, 3, 4, 5, 6]]
as the argument:
echo "[[1, 2, 4, 8, 16], [1, 2, 3, 4, 5, 6]]" | cargo run --release -- target/dev/complex.sierra.json
Here are more examples for running different Cairo programs:
echo "[10]" | cargo run --release -- target/dev/fib.sierra.json
echo "[1, 2, 10, 5, 9, [1, 2, 3]]" | cargo run --release -- target/dev/structs.sierra.json
echo "[[1, 3, 9, 27]]" | cargo run --release -- target/dev/sum.sierra.json
These examples demonstrate the versatility and ease of using Cairo Args Runner for different types of Cairo 1 programs.