Skip to content

“Hello, Cairo” describes Cairo for the programmer who wishes to understand what Cairo can do hands-on, and start writing programs in Cairo.

Notifications You must be signed in to change notification settings

xavier-brochard/hello-cairo

Repository files navigation

Hello Cairo

https://starknet.io/docs/hello_cairo https://starknet.io/docs/quickstart.html

Create Python virtual env

python3.7 -m venv ~/cairo_venv
source ~/cairo_venv/bin/activate

Properly open VSCode

cd hello-starknet
source ~/cairo_venv/bin/activate
code .

Build

cairo-compile XXX.cairo --out XXX_compiled.json

Run

cairo-run \
  --print_output \
  --layout=small \
  --print_info --relocate_prints \
  --profile_output profile.pb.gz \
  --program=XXX_compiled.json

Debugging / Profiling

https://starknet.io/docs/how_cairo_works/debugging_tricks.html#debugging-tricks

Using Go:

go tool pprof --web profile.pb.gz

Or using this Docker image:

docker run --net=host -v$PWD:/tmp starkwarelibs/pprof profile.pb.gz

About

“Hello, Cairo” describes Cairo for the programmer who wishes to understand what Cairo can do hands-on, and start writing programs in Cairo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published