Skip to content

Commit c2ce7af

Browse files
ISO 26262 and Rust Gap Analysis for the front-page to evaluate Rust safety-critical readiness (#562)
* Added general overview of Rust safety-critical readiness together with the start of an ISO 26262 vs. Rust Gap Analysis documentation * further improved the gap-analysis and corrected typos * refactored the gap analysis for clarity and completeness * final touches and editing * Updated the ratings based on vjonaswolf comments * Front page overview updated * final touches to use standard font sizes and colors matching the common traffic light emojis
1 parent d92f7e9 commit c2ce7af

9 files changed

Lines changed: 553 additions & 5 deletions

File tree

arewesafetycriticalyet.org/docs/main/intro.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,45 @@ sidebar_position: 1
33
---
44

55
# Are We Safety Critical Yet?
6+
7+
## What is Safety-Critical?
8+
9+
Software is not inherently "safe" or "unsafe" in isolation - it becomes safety-critical when it controls actions in the physical world that could potentially cause harm to people or the environment. Whether software is safety-critical is thus determined by its operational context: specifically, whether it contributes to system hazards as established through risk analysis and system design.
10+
11+
**Note:** Functional safety addresses risks from unintended malfunctions. It is distinct from cybersecurity, which addresses intentional malicious attacks.
12+
13+
## Evaluating safety-critical readiness of “Rust”
14+
15+
In practice, software is considered safe by demonstrating compliance with the relevant safety standard for the target industry and application. It is worth noting that compliance is a proxy for safety: compliant systems can still be unsafe, and non-compliant systems can be safe. The standard provides a structured framework, not a guarantee.
16+
17+
For this analysis, safety-critical readiness is measured by how well Rust's language design, toolchain, and ecosystem enable developers to meet the requirements of the relevant safety standards when developing safety-critical applications.
18+
19+
## Standards-Based Evaluations
20+
21+
The following evaluation examines how well specific safety-standard requirements can be satisfied when using Rust, based on the following scale:
22+
23+
🟢 Well supported - requirement can be met with no additional effort
24+
25+
🟡 Achievable - requirement can be met with moderate additional effort
26+
27+
🔴 Gap - requirement needs substantial additional effort or qualification activity
28+
29+
⚪ Not impacted - requirement is not directly affected by the choice of programming language
30+
31+
**Note:** Safety standards generally leave room for interpretation. In standards such as ISO 26262, final compliance claims are subject to the assessor's judgment.
32+
33+
### ISO 26262
34+
35+
🟡 Achievable with moderate additional effort
36+
37+
Rust's core language features - memory safety, strong typing, and data race prevention - provide excellent basis for ISO 26262 compliance. However, critical gaps exist in qualified tools, control/data flow analysis, and qualified RTOS/HAL/PAC support. These require individual qualification efforts and are barriers for production use.
38+
39+
[Detailed Rust vs. ISO 26262 gap analysis](iso26262.md)
40+
41+
### IEC 61508
42+
43+
Analysis in preparation. Contributions welcome via [GitHub](https://github.com/rustfoundation/safety-critical-rust-consortium).
44+
45+
### DO-178C
46+
47+
Analysis in preparation. Contributions welcome via [GitHub](https://github.com/rustfoundation/safety-critical-rust-consortium).

arewesafetycriticalyet.org/docs/main/iso26262.md

Lines changed: 262 additions & 0 deletions
Large diffs are not rendered by default.

arewesafetycriticalyet.org/docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const baseUrl = process.env.BASE_URL || '/';
88

99
const config: Config = {
1010
title: 'Are We Safety Critical Yet?',
11-
tagline: 'It depends 🤔, we have a few certified compilers, a few certification products in-progress and a few use cases.',
11+
tagline: 'Tracking Rust\'s readiness for safety-critical development across industry standards.',
1212
favicon: 'img/favicon.ico',
1313

1414
// Set the production url of your site here

arewesafetycriticalyet.org/src/components/HomepageFeatures/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export default function HomepageFeatures(): ReactNode {
6666
return (
6767
<section className={styles.features}>
6868
<div className="container">
69+
<Heading as="h2" className="text--center margin-bottom--lg">
70+
Consortium Working Groups
71+
</Heading>
6972
<div className="row">
7073
{FeatureList.map((props, idx) => (
7174
<Feature key={idx} {...props} />
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
import type {ReactNode} from 'react';
2+
import clsx from 'clsx';
3+
import Link from '@docusaurus/Link';
4+
import Heading from '@theme/Heading';
5+
import styles from './styles.module.css';
6+
7+
type Rating = 'green' | 'yellow' | 'red' | 'grey';
8+
9+
interface Standard {
10+
name: string;
11+
rating: Rating;
12+
verdict: string;
13+
description: string;
14+
detailsUrl: string | null;
15+
}
16+
17+
const standards: Standard[] = [
18+
{
19+
name: 'ISO 26262',
20+
rating: 'yellow',
21+
verdict: 'Achievable with moderate additional effort',
22+
description:
23+
"Rust's core language features - memory safety, strong typing, and data race prevention - provide an excellent basis for ISO 26262 compliance. Critical gaps exist in qualified tools, control/data flow analysis, and qualified RTOS/HAL/PAC support.",
24+
detailsUrl: '/docs/iso26262',
25+
},
26+
{
27+
name: 'IEC 61508',
28+
rating: 'grey',
29+
verdict: 'Analysis in preparation',
30+
description: 'Contributions welcome.',
31+
detailsUrl: null,
32+
},
33+
{
34+
name: 'DO-178C',
35+
rating: 'grey',
36+
verdict: 'Analysis in preparation',
37+
description: 'Contributions welcome.',
38+
detailsUrl: null,
39+
},
40+
];
41+
42+
const ratingDotClass: Record<Rating, string> = {
43+
green: styles.dotGreen,
44+
yellow: styles.dotYellow,
45+
red: styles.dotRed,
46+
grey: styles.dotGrey,
47+
};
48+
49+
const ratingCardClass: Record<Rating, string> = {
50+
green: styles.standardCardGreen,
51+
yellow: styles.standardCardYellow,
52+
red: styles.standardCardRed,
53+
grey: '',
54+
};
55+
56+
function RatingDot({rating}: {rating: Rating}) {
57+
return <span className={clsx(styles.dot, ratingDotClass[rating])} />;
58+
}
59+
60+
function StandardCard({standard}: {standard: Standard}) {
61+
return (
62+
<div
63+
className={clsx(
64+
styles.standardCard,
65+
ratingCardClass[standard.rating],
66+
!standard.detailsUrl && styles.standardCardPending,
67+
)}>
68+
<div className={styles.cardHeader}>
69+
<RatingDot rating={standard.rating} />
70+
<Heading as="h3">{standard.name}</Heading>
71+
</div>
72+
<p className={styles.verdict}>{standard.verdict}</p>
73+
<p className={styles.description}>{standard.description}</p>
74+
{standard.detailsUrl ? (
75+
<Link to={standard.detailsUrl} className={styles.detailsLink}>
76+
View detailed analysis &rarr;
77+
</Link>
78+
) : (
79+
<Link
80+
to="https://github.com/rustfoundation/safety-critical-rust-consortium"
81+
className={styles.detailsLink}>
82+
Contribute on GitHub &rarr;
83+
</Link>
84+
)}
85+
</div>
86+
);
87+
}
88+
89+
export default function StandardsOverview(): ReactNode {
90+
return (
91+
<section className={styles.overview}>
92+
<div className="container">
93+
<Heading as="h2" className="text--center margin-bottom--sm">
94+
Standards-Based Evaluations
95+
</Heading>
96+
<p className={clsx('text--center', styles.introText)}>
97+
Safety-critical readiness is measured by how well Rust's language design, toolchain, and
98+
ecosystem enable developers to meet the requirements of the relevant safety standards.
99+
For more context, see the{' '}
100+
<Link to="/docs/intro">full overview</Link>.
101+
</p>
102+
103+
<div className={styles.legend}>
104+
<span className={styles.legendItem}>
105+
<RatingDot rating="green" /> Well supported
106+
</span>
107+
<span className={styles.legendItem}>
108+
<RatingDot rating="yellow" /> Achievable with effort
109+
</span>
110+
<span className={styles.legendItem}>
111+
<RatingDot rating="red" /> Gap
112+
</span>
113+
<span className={styles.legendItem}>
114+
<RatingDot rating="grey" /> Not yet rated
115+
</span>
116+
</div>
117+
118+
<div className="row">
119+
{standards.map(standard => (
120+
<div className="col col--4 margin-bottom--lg" key={standard.name}>
121+
<StandardCard standard={standard} />
122+
</div>
123+
))}
124+
</div>
125+
</div>
126+
</section>
127+
);
128+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
.overview {
2+
padding: 2rem 0;
3+
}
4+
5+
.introText {
6+
max-width: 700px;
7+
margin: 0 auto 1rem;
8+
}
9+
10+
.legend {
11+
display: flex;
12+
flex-wrap: wrap;
13+
gap: 1.5rem;
14+
justify-content: center;
15+
margin-bottom: 2rem;
16+
color: var(--ifm-color-emphasis-700);
17+
}
18+
19+
.legendItem {
20+
display: flex;
21+
align-items: center;
22+
gap: 0.4rem;
23+
}
24+
25+
.dot {
26+
width: 12px;
27+
height: 12px;
28+
border-radius: 50%;
29+
display: inline-block;
30+
flex-shrink: 0;
31+
}
32+
33+
.dotGreen {
34+
background-color: var(--rating-green);
35+
}
36+
37+
.dotYellow {
38+
background-color: var(--rating-yellow);
39+
}
40+
41+
.dotRed {
42+
background-color: var(--rating-red);
43+
}
44+
45+
.dotGrey {
46+
background-color: var(--rating-grey);
47+
}
48+
49+
.standardCard {
50+
border: 1px solid var(--ifm-color-emphasis-200);
51+
border-left: 4px solid var(--rating-grey);
52+
border-radius: 6px;
53+
padding: 1.25rem;
54+
height: 100%;
55+
display: flex;
56+
flex-direction: column;
57+
}
58+
59+
.standardCardGreen {
60+
border-left-color: var(--rating-green);
61+
}
62+
63+
.standardCardYellow {
64+
border-left-color: var(--rating-yellow);
65+
}
66+
67+
.standardCardRed {
68+
border-left-color: var(--rating-red);
69+
}
70+
71+
.standardCardPending {
72+
opacity: 0.6;
73+
border-left-style: dashed;
74+
}
75+
76+
.cardHeader {
77+
display: flex;
78+
align-items: center;
79+
gap: 0.5rem;
80+
margin-bottom: 0.5rem;
81+
}
82+
83+
.cardHeader h3 {
84+
margin: 0;
85+
}
86+
87+
.verdict {
88+
font-weight: 600;
89+
margin-bottom: 0.5rem;
90+
}
91+
92+
.description {
93+
color: var(--ifm-color-emphasis-700);
94+
flex: 1;
95+
}
96+
97+
.detailsLink {
98+
margin-top: 0.75rem;
99+
}

arewesafetycriticalyet.org/src/css/custom.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
--ifm-color-primary-lightest: #273168;
1616
--ifm-code-font-size: 95%;
1717
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
18+
19+
/* Match the emoji colors: 🟢 🟡 🔴 ⚪ */
20+
--rating-green: #4caf50;
21+
--rating-yellow: #fdd835;
22+
--rating-red: #f44336;
23+
--rating-grey: #bdbdbd;
1824
}
1925

2026
/* For readability concerns, you should choose a lighter palette in dark mode. */

arewesafetycriticalyet.org/src/pages/index.module.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@
2121
align-items: center;
2222
justify-content: center;
2323
}
24+
25+
.divider {
26+
border-top: 1px solid var(--ifm-color-emphasis-200);
27+
max-width: 800px;
28+
margin: 0 auto;
29+
}

arewesafetycriticalyet.org/src/pages/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Link from '@docusaurus/Link';
44
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
55
import Layout from '@theme/Layout';
66
import HomepageFeatures from '@site/src/components/HomepageFeatures';
7+
import StandardsOverview from '@site/src/components/StandardsOverview';
78
import Heading from '@theme/Heading';
89

910
import styles from './index.module.css';
@@ -21,7 +22,7 @@ function HomepageHeader() {
2122
<Link
2223
className="button button--secondary button--lg"
2324
to="/docs/intro">
24-
Find out!
25+
Read the overview
2526
</Link>
2627
</div>
2728
</div>
@@ -30,13 +31,14 @@ function HomepageHeader() {
3031
}
3132

3233
export default function Home(): ReactNode {
33-
const {siteConfig} = useDocusaurusContext();
3434
return (
3535
<Layout
36-
title={`Hello from ${siteConfig.title}`}
37-
description="Description will go into a meta tag in <head />">
36+
title="Are We Safety Critical Yet?"
37+
description="Tracking Rust's readiness for safety-critical software development across ISO 26262, IEC 61508, and DO-178C.">
3838
<HomepageHeader />
3939
<main>
40+
<StandardsOverview />
41+
<div className={styles.divider} />
4042
<HomepageFeatures />
4143
</main>
4244
</Layout>

0 commit comments

Comments
 (0)