Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/arewesafetycriticalyet-org-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test AreWeSafetyCriticalYet.org Deployment

on:
pull_request_target:
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
merge_group:

permissions:
contents: write
pull-requests: write

jobs:
test-deploy:
name: Test AreWeSafetyCriticalYet.org Deployment
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: |
arewesafetycriticalyet.org/package-lock.json

- name: Install dependencies
working-directory: arewesafetycriticalyet.org
run: npm ci

- name: Test build website
working-directory: arewesafetycriticalyet.org
env:
BASE_URL: "/safety-critical-rust-consortium/pr-preview/pr-${{ github.event.pull_request.number }}/"
run: npm run build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy PR to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./arewesafetycriticalyet.org/build
destination_dir: "pr-preview/pr-${{ github.event.pull_request.number }}"
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
keep_files: true

- name: Publish the link in a PR comment
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "✅ Temporary published at https://rustfoundation.github.io/safety-critical-rust-consortium/pr-preview/pr-${{ github.event.pull_request.number }}"
env:
GH_TOKEN: ${{ github.token }}
52 changes: 52 additions & 0 deletions .github/workflows/arewesafetycriticalyet-org.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy AreWeSafetyCriticalYet.org to GitHub Pages

on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

permissions:
contents: write

jobs:
deploy:
name: Deploy AreWeSafetyCriticalYet.org to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: |
arewesafetycriticalyet.org/package-lock.json

- name: Install dependencies
working-directory: arewesafetycriticalyet.org
run: npm ci

- name: Build website
working-directory: arewesafetycriticalyet.org
run: npm run build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./arewesafetycriticalyet.org/build
destination_dir: "website"
cname: arewesafetycriticalyet.org
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
20 changes: 20 additions & 0 deletions arewesafetycriticalyet.org/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
26 changes: 26 additions & 0 deletions arewesafetycriticalyet.org/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Website

This folder stores the `arewesafetycriticalyet.org` website that is built with [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ npm install
```

### Local Development

```
$ npm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ npm build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

12 changes: 12 additions & 0 deletions arewesafetycriticalyet.org/blog/2019-05-28-first-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
slug: first-blog-post
title: First Blog Post
authors: [slorber, yangshun]
tags: [hola, docusaurus]
---

Lorem ipsum dolor sit amet...

<!-- truncate -->

...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
44 changes: 44 additions & 0 deletions arewesafetycriticalyet.org/blog/2019-05-29-long-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
slug: long-blog-post
title: Long Blog Post
authors: yangshun
tags: [hello, docusaurus]
---

This is the summary of a very long blog post,

Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.

<!-- truncate -->

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
24 changes: 24 additions & 0 deletions arewesafetycriticalyet.org/blog/2021-08-01-mdx-blog-post.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
slug: mdx-blog-post
title: MDX Blog Post
authors: [slorber]
tags: [docusaurus]
---

Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).

:::tip

Use the power of React to create interactive blog posts.

:::

{/* truncate */}

For example, use JSX to create an interactive button:

```js
<button onClick={() => alert('button clicked!')}>Click me!</button>
```

<button onClick={() => alert('button clicked!')}>Click me!</button>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions arewesafetycriticalyet.org/blog/2021-08-26-welcome/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
slug: welcome
title: Welcome
authors: [slorber, yangshun]
tags: [facebook, hello, docusaurus]
---

[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).

Here are a few tips you might find useful.

<!-- truncate -->

Simply add Markdown files (or folders) to the `blog` directory.

Regular blog authors can be added to `authors.yml`.

The blog post date can be extracted from filenames, such as:

- `2019-05-30-welcome.md`
- `2019-05-30-welcome/index.md`

A blog post folder can be convenient to co-locate blog post images:

![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)

The blog supports tags as well!

**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
23 changes: 23 additions & 0 deletions arewesafetycriticalyet.org/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
yangshun:
name: Yangshun Tay
title: Front End Engineer @ Facebook
url: https://github.com/yangshun
image_url: https://github.com/yangshun.png
page: true
socials:
x: yangshunz
github: yangshun

slorber:
name: Sébastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
page:
# customize the url of the author page at /blog/authors/<permalink>
permalink: '/all-sebastien-lorber-articles'
socials:
x: sebastienlorber
linkedin: sebastienlorber
github: slorber
newsletter: https://thisweekinreact.com
19 changes: 19 additions & 0 deletions arewesafetycriticalyet.org/blog/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
facebook:
label: Facebook
permalink: /facebook
description: Facebook tag description

hello:
label: Hello
permalink: /hello
description: Hello tag description

docusaurus:
label: Docusaurus
permalink: /docusaurus
description: Docusaurus tag description

hola:
label: Hola
permalink: /hola
description: Hola tag description
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Members
38 changes: 38 additions & 0 deletions arewesafetycriticalyet.org/docs/coding_guidelines/mission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Mission Statement

Develop a community-vetted coding guideline for Rust in safety-critical applications. A living document that is updated as features are added to Rust and we learn more by doing.

The following are relevant safety-critical coding guidelines. We are also interested in adopting knowledge obtained that may currently be in company-specific documents and incorporating these into the coding guideline.

## State of Rust Safety-Critical Coding Guidelines

### SAE: SAfEr Rust Task Force

An effort led out of [SAE](https://www.sae.org/) titled the [SAfEr Rust Task Force](https://standardsworks.sae.org/standards-committees/safer-rust-task-force) has the following mission statement:

> Rust is a new programming language which combines high run time efficiency and modern design patterns with rigorous compile time checks.The scope of the task force will be to document best practices for the use of Rust that can be applied to Safety-Related Systems development.The scope will not include repetition of existing guidelines, but will summarize and point to them; if existing guidelines differ from this document, these will be noted.Objectives of this task force will be to: 1. Evaluate the Rust ecosystem to identify a Safer subset of Rust. 2. Develop guidelines with respect to the Rust subset for: a. Integrating Rust into automotive and aerospace safety-related applications b. Avoiding programming mistakes and failures that could lead to hazards, and c. Increasing confidence in its use in the automotive and aerospace industry 3. Document evidence to support the guidelines, and to 4. Provide general recommendations for the use of Rust to support safety and cybersecurity.

There is a draft version of these recommendations available [here](https://www.sae.org/standards/content/ja1020/) as JA1020. Because it is a draft, it's not viewable unless you join the SAfEr Rust Task Force as an SAE member.

### AUTOSAR Foundation: Working Group for Functional Safety (WG-SAF)

An effort led out of the [AUTOSAR Foundation](https://www.autosar.org/) titled the [Working Group for Functional Safety (WG-SAF)](https://www.autosar.org/news-events/detail?tx_news_pi1%5Baction%5D=detail&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Bnews%5D=139&cHash=b332c8babc7aad27723ab939f9723fc6) has the following mission statement:

> [...] The decision to form a subgroup within the Working Group for Functional Safety (WG-SAF) is a consequence. The subgroup will officially get started on April 2022 and plans to produce two documents. One of the documents will be providing guidance on how Rust can be utilized in the context of AUTOSAR Adaptive Platform projects. The other document will propose Coding Guidelines on Rust.

An outcome of this working group is the [Explanation of ARA Applications in Rust](https://www.autosar.org/fileadmin/standards/R23-11/AP/AUTOSAR_AP_EXP_ARARustApplications.pdf) document which outlines the API which can be used to write Rust applications within an Adaptive AUTOSAR environment.

## Other Safety-Critial Guidelines

### MISRA C, C++

[MISRA](https://misra.org.uk/) creates rules for usage of C and C++ in safety-critical systems.

There was an [effort](https://github.com/PolySync/misra-rust/blob/master/MISRA-Rules.md) taken to identify which MISRA C rules are enforceable, not enforceable, or not applicable when using Rust.

## Existing Guidelines (currently not public)

We would like to put out a request for those that have used Rust in safety-critical applications, may be familiar with `unsafe` best practices, or otherwise feel they have guidelines or experience to contribute to please reach out to us!

As we adopt pieces of these documents we can keep track of contribution provenance here.

1 change: 1 addition & 0 deletions arewesafetycriticalyet.org/docs/liaison/members.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Members
5 changes: 5 additions & 0 deletions arewesafetycriticalyet.org/docs/main/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 1
---

# Are We Safety Critical Yet?
Loading