Skip to content

An interactive tutorial to get you up and running with Cairo v1 and Starknet

License

Notifications You must be signed in to change notification settings

shramee/starklings-cairo1

Repository files navigation

STARKLINGS

STARKLINGS

An interactive tutorial to get you up and running with Cairo and Starknet

Overview

Starklings is an interactive tutorial project designed to help you learn Cairo and Starknet development through practical exercises. The project consists of two main components:

CLI-based interactive tutorial

A web-based in browser Starklings experience

Both versions share the same core exercises and hints, with a single source of truth for all content.

Contributing

Thanks for your interest in the project. You can fork the repo, create a branch with a descriptive name (maybe the issue number and a word or two to describe it) and submit a pull request.

Testing

Cairo related tests

cargo test cairo

All tests

cargo test

App tests

Coming soon

Adding new exercises

Here's what an exercise looks like,

  1. An exercise is pretty much a single well commented Cairo file.
  2. Exercises are organised into modules and are placed in ./exercises/<module_name>/<exercise_name>.cairo
  3. Exercise accompanies some metadata describing it in ./info.toml
  4. When introducing a concept for the first time, try to start minimally.
  5. Subsequent exercises for the same concept can grow in complexity.

Contributing with a new exercise

  1. Add the exercise file in the ./exercises directory.
  2. Insert information about the exercise in ./info.toml file. For example
    [[exercises]]
    name = "new_exercise"
    path = "exercises/new_module/new_exercise.cairo"
    mode = "test"
    hint = """
    Try the Harlem shake
    """
  3. Run your exercise with starklings run as you write
cargo run -r --bin starklings run new_exercise
  1. Check that the tests pass.
  2. Send your PR!

Updating Rust logic/Cairo version

  1. Test your changes.
  2. Make sure you have solutions to all the exercises in ./solutions directory.
  3. Run cargo run -r --bin starklings compile_solutions to confirm all exercise solutions still compile.
  4. Make your pull request.

About

An interactive tutorial to get you up and running with Cairo v1 and Starknet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published