mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-04 10:35:06 +02:00
11fda5d70f
This improves the experience for contributors on Windows becuase Windows can't deal with git symbolic links out of the box…
1.9 KiB
1.9 KiB
Contributing to Rustlings
First off, thanks for taking the time to contribute! ❤️
Quick Reference
I want to …
- report a bug! ➡️ open an issue
- fix a bug! ➡️ open a pull request
- implement a new feature! ➡️ open an issue to discuss it first, then a pull request
- add an exercise! ➡️ read this
- update an outdated exercise! ➡️ open a pull request
Issues
You can open an issue here. If you're reporting a bug, please include the output of the following commands:
cargo --version
rustlings --version
ls -la
- Your OS name and version
Pull Requests
You are welcome to open a pull request, but unless it is small and trivial, please open an issue to discuss your idea first 🙏🏼
Opening a pull request is as easy as forking the repository and committing your changes. If you need any help with it or face any Git related problems, don't hesitate to ask for help 🤗
It may take time to review your pull request. Please be patient 😇
Adding An Exercise
- Name the file
exercises/yourTopic/yourTopicN.rs
. - Make sure to put in some helpful links, and link to sections of the book in
exercises/yourTopic/README.md
. - Add a (possible) solution at
solutions/yourTopic/yourTopicN.rs
with comments and links explaining it. - Add the metadata for your exercise in the
rustlings-macros/info.toml
file. - Make sure your exercise runs with
rustlings run yourTopicN
. - Open a pull request.
Exercise Metadata
The exercise metadata should contain the following:
[[exercises]]
name = "yourTopicN"
dir = "yourTopic"
hint = """A useful (multi-line) hint for your exercise."""
If your exercise doesn't contain any test, add test = false
to the exercise metadata.
But adding tests is recommended.