Skip to content

Commit

Permalink
Update README.md (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee authored Feb 29, 2024
1 parent 719d671 commit 7b00b43
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,31 @@ Thanks for your interest in the project. You can fork the repo, create a branch

### Adding new exercises

1. New exercises can be added in `./exercises` directory.
#### 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
```toml
[[exercises]]
name = "new_exercise"
path = "exercises/new_module/new_exercise.cairo"
mode = "compile" # or "test"
hint = """"""
mode = "test"
hint = """
Try the Harlem shake
"""
```
3. Check that the [tests](#testing) pass.
4. Send your PR!
3. Run your exercise with `starklings run` as you write
```
cargo run -r --bin starklings run new_exercise
```
4. Check that the [tests](#testing) pass.
5. Send your PR!
### Updating Rust logic/Cairo version
Expand Down

0 comments on commit 7b00b43

Please sign in to comment.