-
Couldn't load subscription status.
- Fork 20
Add GOALS.md, revise contribution process, freshen up to use arewesafetycriticalyet.org #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PLeVasseur
wants to merge
30
commits into
rustfoundation:main
Choose a base branch
from
PLeVasseur:feature/coding-guidelines-goals
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
881c4d8
Move goals into GOALS.md
PLeVasseur 9407d28
Add GOALS.md link to README.md. Update URL of deployed version to are…
PLeVasseur 5ae93b5
Update GOALS.md
PLeVasseur 79b20ab
Update GOALS.md
PLeVasseur 231fc26
Update GOALS.md
PLeVasseur b15597d
Update GOALS.md
PLeVasseur 4f0f9fe
Update GOALS.md
PLeVasseur 7c89bd9
Make steps more concrete on how to contribute.
PLeVasseur 8a09b72
Add diagram
PLeVasseur ff367d1
Update contribution workflow diagram
PLeVasseur d05a868
Phrasing
PLeVasseur ee9be58
Add table of contents
PLeVasseur 94498ac
Phrasing
PLeVasseur 3c9aaa9
Phrasing
PLeVasseur 6b377f6
Phrasing
PLeVasseur baac836
Clarification around finding or creating lints for Clippy
PLeVasseur 5d829dd
chore: extract contribution details into CONTRIBUTION.md
PLeVasseur e9b7bb8
feat: address what we provide for machine-readable artifacts
PLeVasseur fb80c0c
feat: clarify elevator pitch
PLeVasseur d20616f
feat: add link to what we mean by decidability
PLeVasseur 59977ec
Making steps easier to read
PLeVasseur 8faf510
Updating headings
PLeVasseur 129b3b4
Update heading, a bit of reorganization
PLeVasseur 0ecb553
Clarification
PLeVasseur b0adfb4
Aid in human parsing
PLeVasseur 59ed11b
fix: remove left over suggestion tag at top
PLeVasseur a71bb30
docs: clarify which portion of MISRA Compliance: 2020 contains MRAD c…
PLeVasseur bdfc48a
docs: clarify which standards starting with and why
PLeVasseur 01e2a2c
docs: clarify what we're providing in a machine readable format and f…
PLeVasseur 25cae3b
docs: clarify what language subsetting means and where to find more a…
PLeVasseur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Goals | ||
|
|
||
| ## Elevator pitch | ||
|
|
||
| We will make Rust coding guidelines available within this repository. The coding guidelines will additionally be deployed to an accessible location on the internet. These coding guideliens will comply with relevant standards for various safety-critical industries such as: IEC 61508, ISO 26262, and DO 178. | ||
|
|
||
| ## Detailed | ||
|
|
||
| In general these coding guidelines will be a set of rules of do / do not do with examples which should cover all "general" aspects of the Rust programming language, e.g. enums, structs, traits, and so on. We will use the [FLS](https://rust-lang.github.io/fls/index.html) as a means to ensure we have a reasonable coverage of the language. | ||
|
|
||
| There will be an addendum which covers how various safety standards like ISO 26262 map onto the coding guidelines. | ||
|
|
||
| ## Criteria | ||
|
|
||
| * We produce coding guidelines that make a "best effort" attempt at cataloging common pieces (e.g. functions, arithmetic, unsafe) of the Rust programming language and how they fit into a safety-critical project | ||
| * We will use [MISRA Compliance: 2020](https://misra.org.uk/app/uploads/2021/06/MISRA-Compliance-2020.pdf) for categorization purposes: Mandatory, Required, Advisory, Disapplied. See section 5 of MISRA Compliance: 2020 for more details. | ||
| * We include a rationale with links to parts of the Rust Project and wider Rust community for guidance | ||
| * We will include linkage where appropriate to to various standards, e.g. CERT C, MISRA C, DO 178, ISO 26262 | ||
| * We will include practical recommendations on how to use this piece of the language using compliant and non-compliant examples | ||
| * We will develop an addendum matrix to 1. clarify which safety standards are supported 2. lower burden of users | ||
| * We will begin with DO 178 and ISO 26262 | ||
| * We will begin perhaps chapter level, maybe subsection level _for now_ and may expand granularity of matrix mapping later | ||
| * We will release the coding guidelines tagged with the versions of stable Rust that they support (e.g. `1.42`) | ||
| * We will find or create Clippy lints which will cover decidable guidelines | ||
|
|
||
| ### Criteria obtained by discussion with Tooling Subcommittee | ||
|
|
||
| * We will affix a label for each guideline, which describes whether said guideline is decidable or not (in the [theory of computation sense](https://en.wikipedia.org/wiki/Decidability_(logic))) | ||
| * We will include for each guideline a minimum of one compliant and one non-compliant example of code, to help illustrate its exact meaning and context. | ||
| * We will consider only the language reference / spec, not the tooling availability when writing the coding guidelines | ||
| * We aim to produce evidence-based guidelines, with statistics around human error when programming Rust, to support: | ||
| 1. What guidelines are written, and | ||
| 2. Why a specific suggestion was made | ||
| * We will produce the guidelines and a hash of their contents in a machine readable and consistent format, to make consumption simpler for tool vendors. These artifacts are: | ||
| * a `needs.json` containing the contents of the coding guidelines | ||
| * a `guidelines-ids.json` which has hashes of the guidelines' contents, which can be used to check against (and break) a tool vendor's build, until an audit is performed | ||
|
|
||
| # Explicit non-goals | ||
|
|
||
| * For the initial version to have complete coverage of the Rust programming language | ||
| * "Something" shipped to alleviate pressure at organizations is better than "nothing is available" | ||
| * An accepted means of delivering partially complete coding guidelines by IEC 61508 and other | ||
| similar safety standards is to subset the language. | ||
| * Language subsetting as defined in IEC 61508 and ISO 26262 may be used to prevent the usage | ||
| of certain language constructs which are not suitable for use in safety-critical systems. | ||
| * The same mechanism can be used to subset out portions of the Rust programming language for | ||
| which we do not yet have a sufficient degree of coverage via the coding guidelines. | ||
| * For a more detailed treatment, please see IEC 61508:2010-7, Annex C: "C.2.6.2 Coding standards" | ||
| for a breakdown in a table and "C.4.2 Language subsets" for rationale. | ||
| * A commented version of IEC 61508 is available [here](https://share.ansi.org/Shared%20Documents/News%20and%20Publications/Other%20Documents/IEC%2061508%20Commented%20Version.pdf) from ANSI. | ||
| * For any version to be conflict-free with various members' or their organizations' viewpoints | ||
| * Members and their organizations may take different stances on how The Rust Programming Language's constructs should be viewed and approached. This is **okay and expected**. | ||
| * We'd like to ship something that we can obtain broad consensus on. | ||
| * Worst case scenario: there may be a section here or there which a user may need to adjust in an internal version, which would then be downstreamed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.