Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 809 Bytes

README.MD

File metadata and controls

52 lines (37 loc) · 809 Bytes

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