Compiling and running Cairo files
Compile Cairo to Sierra:
cargo run --bin cairo-compile -- --single-file /path/to/input.cairo /path/to/output.sierra --replace-ids
Compile Sierra to casm (Cairo assembly):
cargo run --bin sierra-compile -- /path/to/input.sierra /path/to/output.casm
Run Cairo code directly:
cargo run --bin cairo-run -- --single-file /path/to/file.cairo
For more information, see here.
You can also find Cairo examples in the examples directory within the main Cairo repository.
For running tests specifically, see here.