-
Notifications
You must be signed in to change notification settings - 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
20
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
20 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 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,44 @@ | ||
# 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 | ||
* 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 reduce burden of attaching these later | ||
* We will begin with DO 178 and ISO 26262 at perhaps chapter level, maybe subsection level _for now_ and expand 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 in an artifact that's easily machine readable and consistent format to make it easier to consume by tool vendors to some minimal viable artifact. | ||
* 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 vendors build until 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" even if we have to heavily subset the language | ||
* 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which part of the MISRA Compliance: 2020 document are we using? (the pdf is 39 pages long)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scary voice: the whole thing!!
But seriously, @AlexCeleste may be better equipped to tell us if we need cite a page range or the entire document.