|
| 1 | +<!-- |
| 2 | +SPDX-FileCopyrightText: Copyright © 2025 hashcatHitman |
| 3 | +
|
| 4 | +SPDX-License-Identifier: Apache-2.0 OR MIT |
| 5 | +--> |
| 6 | + |
| 7 | +# Contribution Guidelines |
| 8 | + |
| 9 | +Thanks for your interest in contributing to the project! These guidelines are |
| 10 | +meant to help you contribute effectively, and you are encouraged to read and |
| 11 | +follow them! |
| 12 | + |
| 13 | +## AI Policy |
| 14 | + |
| 15 | +This project is made by humans for humans. All use of artificial intelligence |
| 16 | +(AI), large-language models (LLMs), or similar techniques is forbidden. This |
| 17 | +includes but is not limited to the use of "ChatGPT", "Copilot", "Claude", and |
| 18 | +other models. |
| 19 | + |
| 20 | +This applies to **all** contributions. This includes but is not limited to issue |
| 21 | +reports, security reports, feature requests, pull requests, translations, commit |
| 22 | +messages, comments, audio, videos, images, and ideas. A poorly-made logo made by |
| 23 | +an amateur/non artist is preferable to an AI-generated image 100% of the time. |
| 24 | + |
| 25 | +If you are physically impaired and use these tools to assist with the reading |
| 26 | +and/or writing of contributions, you should take steps to ensure that no part of |
| 27 | +your contributions are changed from your original thoughts. Traditional screen |
| 28 | +readers and Text-To-Speech (TTS) tools will likely provide better assurance of |
| 29 | +this. |
| 30 | + |
| 31 | +If you don't understand something, please ask others to explain it to you and/or |
| 32 | +research it by hand. A good place to start would be the "Discussions" tab. |
| 33 | + |
| 34 | +I can't really forbid the use of the contents of this repository in the training |
| 35 | +of AI/LLMs, as that currently isn't compatible with being "open source". That |
| 36 | +said: |
| 37 | + |
| 38 | +**Pretty please don't train AI on this project or the surrounding discussions |
| 39 | +(issues, pull requests, comments, etc).** |
| 40 | + |
| 41 | +## Reporting Issues and Requesting Features |
| 42 | + |
| 43 | +To report issues or request features, use the "Issues" tab. Do NOT report |
| 44 | +security issues there - please see [our Security Policy] for that instead. |
| 45 | + |
| 46 | +## Commits |
| 47 | + |
| 48 | +### Atomicity |
| 49 | + |
| 50 | +It is preferred that individual commits are atomic; they should be small and |
| 51 | +each individual commit should be capable of passing CI (and ideally, actually |
| 52 | +work - at least as well as it did beforehand). This is not a strict requirement |
| 53 | +for commits that are part of a pull request, but the pull request as a whole |
| 54 | +must pass CI and should, ideally, break nothing. |
| 55 | + |
| 56 | +### Linear History and Rebasing |
| 57 | + |
| 58 | +This repository enforces linear commit history. Please ensure your development |
| 59 | +branch is up to date before attempting to make any changes, and rebase onto main |
| 60 | +before pushing commits. |
| 61 | + |
| 62 | +### Commit Signing |
| 63 | + |
| 64 | +This repository enforces and commit signing. You should have a signing key |
| 65 | +configured for your account - SSH is preferred. You can learn more about how to |
| 66 | +do that in the [GitHub docs]. |
| 67 | + |
| 68 | +### Commit Messages |
| 69 | + |
| 70 | +It is good practice to follow the 50/72 rule for commit messages. The first line |
| 71 | +should be 50 characters, and the following description 72 characters per line. |
| 72 | + |
| 73 | +If you need to use more than 50 characters on the first line, don't lose your |
| 74 | +mind trying to make 50 characters work. Just try to keep it reasonable. |
| 75 | + |
| 76 | +If you're familiar with [Conventional Commits], the suggestions made there are |
| 77 | +typically welcome as well. |
| 78 | + |
| 79 | +An example commit message might look like: |
| 80 | + |
| 81 | +```text |
| 82 | +fix: removed needless panic |
| 83 | +
|
| 84 | +For some reason there was a `panic!()` hidden in one of the builders |
| 85 | +that was causing crashes. That's gone now. |
| 86 | +``` |
| 87 | + |
| 88 | +Above all else, your commit message should be descriptive and explain what has |
| 89 | +changed. |
| 90 | + |
| 91 | +## Rust Version |
| 92 | + |
| 93 | +This project uses some lints that require the Nightly toolchain. You are |
| 94 | +encouraged to use Nightly for development, but keep in mind the project is |
| 95 | +expected to pass CI on MSRV. The lints have been configured such that you will |
| 96 | +get warnings for `unknown_lints` on MSRV, but should still be able to build |
| 97 | +and test fine. |
| 98 | + |
| 99 | +If you are developing on Nightly, you should create `./.cargo/config.toml` and |
| 100 | +include at least the following: |
| 101 | + |
| 102 | +```toml |
| 103 | +[build] |
| 104 | +rustflags = [ |
| 105 | + "-Zcrate-attr=feature(strict_provenance_lints,unqualified_local_imports)", |
| 106 | +] |
| 107 | +``` |
| 108 | + |
| 109 | +This enables the features needed for the Nightly-only lints. |
| 110 | + |
| 111 | +## Licensing |
| 112 | + |
| 113 | +<!-- Adapted from Arti's README --> |
| 114 | + |
| 115 | +This code is licensed under either of |
| 116 | + |
| 117 | +- Apache License, Version 2.0 |
| 118 | +- MIT license |
| 119 | + |
| 120 | +at your option. |
| 121 | + |
| 122 | +Unless you explicitly state otherwise, any contribution intentionally submitted |
| 123 | +for inclusion in the work by you, as defined in the Apache-2.0 license, shall be |
| 124 | +dual licensed as above, without any additional terms or conditions. |
| 125 | + |
| 126 | +Additionally, this project attempts to be compliant with [version 3.3 of the |
| 127 | +REUSE Specification]. Please make sure it stays that way! |
| 128 | + |
| 129 | +[our Security Policy]: ./SECURITY.md |
| 130 | +[GitHub docs]: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification |
| 131 | +[Conventional Commits]: https://www.conventionalcommits.org |
| 132 | +[version 3.3 of the REUSE Specification]: https://reuse.software/spec-3.3/ |
0 commit comments