Create a repository from this template, clone it locally and run make install
. VoilĂ !
make install
: Sets up the cairo git submodulemake update
: Updates the cairo submodulemake build
: Builds the cairo 1 compilermake test dir=<path>
: Runs the tests in a cratemake format
: Formats cairo files undersrc/
make check-format
: Checks format for files undersrc/
make starknet-compile file=<path>
: Runsstarknet-compile
on a cairo file and stores the output underout/
make language-server
: Builds the Cairo 1 Language Server
make starknet-compile file=src/erc20.cairo
make starknet-compile file=src/storage.cairo
To get proper syntax highlighting and code navigation in your editor, you will need the Cairo 1 extension.
You can find instructions on how to install the vscode extension here.
You can build the language server manually by running make language-server
, and then edit the configuration file of the extension to point to full path of the executable under target/release/language-server
.
The language server needs the corelib/ directory to be present in the root directory of the project, hence it is copied from the cairo submodule when running make install
.