From 7b00b4301bd25d98499d1434cd1ff2d96bcff010 Mon Sep 17 00:00:00 2001 From: Shramee Srivastav Date: Thu, 29 Feb 2024 23:55:41 +0530 Subject: [PATCH] Update README.md (#195) --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b1da19d5a..fde2369e6 100755 --- a/README.md +++ b/README.md @@ -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//.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