Run this command to install cairo-lang on your machine.
curl -sL https://raw.githubusercontent.com/lambdaclass/cairo-by-example/main/build/installer.sh | bash -s 2.2.0
These examples will assume that the cairo-lang version is set to 2.2.0, execute the script above to install this specific version.
An introduction to Cairo, with simple examples.
The objective of this tutorial is to quickly on-board new developers to Cairo. The first experience newcomers have with Cairo and Starknet should be smooth and in 15 minutes they should have everything setup and a good overview on what the language is all about.
- hello world
- named parameters
- if expression
- field arithmetic
- pattern matching
- clone and copy
- naming convention
- operator overloading
- system calls