|
| 1 | +# Contributing |
| 2 | + |
| 3 | +I hope that you've enjoyed reading these solutions as much as I enjoyed writing them. |
| 4 | +They're pretty fast and clean...but can you make them even *faster and cleaner*? |
| 5 | + |
| 6 | +If you have thought of an improvement then please |
| 7 | +[open a pull request](https://github.com/maneatingape/advent-of-code-rust/compare). |
| 8 | +Contributions are encouraged and valued. ❤️ |
| 9 | + |
| 10 | + |
| 11 | +It should generally fall into one of the following two categories: |
| 12 | + |
| 13 | +* 🪲 **Bug Fix** Solutions try to be as general as possible but can't test for every input. |
| 14 | + Your pull request fixes an incorrect answer for your input or prevents a panic. |
| 15 | +* 🚀 **Performance Improvement** Your pull request gives a significant (> 10%) performance |
| 16 | + improvement. This could be achieved by using a better algorithm, better low level optimizations, |
| 17 | + by applying the portable SIMD library or by any other means! |
| 18 | + |
| 19 | +## Legal Notice |
| 20 | + |
| 21 | +When contributing to this project, you must agree that you have authored 100% of the content, |
| 22 | +that you have the necessary rights to the content and that the content you contribute |
| 23 | +may be provided under the project licence. |
| 24 | + |
| 25 | +## Guidelines |
| 26 | + |
| 27 | +Pull requests should meet the following baseline standards: |
| 28 | + |
| 29 | +* Commit messages and pull request title are clear and informative. |
| 30 | +* Code style matches the existing code. This one is somewhat subjective but try to "fit in" by |
| 31 | + using the same naming conventions. Code should be portable, avoiding any architecture |
| 32 | + specific intrinsics. |
| 33 | +* No performance regressions. Benchmark the new solution versus the original and try to keep it |
| 34 | + within a ±5% margin of error. Bug fixes have more leniency to reduce performance. |
| 35 | +* Tests should pass. |
| 36 | +* Code is formatted using `rustfmt`. |
| 37 | +* Code is linted using `clippy`. |
| 38 | + |
| 39 | +Formatting and linting can be executed by running [`just`](https://github.com/casey/just) |
| 40 | +(if installed) on the command line at the project root, or alternatively copying and pasting |
| 41 | +the commands from [`justfile`](justfile) into the terminal. |
0 commit comments