πΊ
Cairo 1.0
β‘
Blazing
β‘
fast
β‘
compiler for Cairo, written in
π¦
Rust
π¦
Report a Bug - Request a Feature - Ask a Question
Getting Started
Prerequisites
- Install Rust
- Setup Rust:
rustup override set stable && rustup update && cargo test
Having installed Rust, go ahead to clone the repo, by running the command below on a terminal:
git clone [email protected]:Darlington02/cairo1.0.git
Compiling and running Cairo files
Compile Cairo Contracts to Sierra:
cargo run --bin cairo-compile -- /path/to/input.cairo /path/to/output.sierra --replace-ids
Compile Starknet Contracts to Sierra:
cargo run --bin starknet-compile -- /path/to/input.cairo /path/to/output.sierra --replace-ids
Compile Cairo-Sierra to casm (Cairo assembly):
cargo run --bin sierra-compile -- /path/to/input.sierra /path/to/output.casm
Compile Starknet-Sierra to casm (Cairo assembly):
cargo run --bin starknet-sierra-compile -- /path/to/input.sierra /path/to/output.casm
Run Cairo code directly:
cargo run --bin cairo-run -- -p /path/to/file.cairo
See more information here. You can also find Cairo examples in the examples directory.
Setting up VSCode for Cairo 1.0 Development
Follow the instructions in vscode-cairo.