Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Add some slides.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpallant committed Sep 12, 2023
1 parent 41459d2 commit d8a3d82
Show file tree
Hide file tree
Showing 18 changed files with 550 additions and 53 deletions.
52 changes: 1 addition & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,13 @@
An introduction to the Ferrocene toolchain, what is is (and isn't) and what it
can do.

## Introduction

In our one hour session on _Why Ferrocene?_ you will learn what Ferrocene is
about, where it is from and where it is going, and whether it is right for you
to look at Ferrocene for your next security-related or safety-critical project.
The agenda includes a short lecture, a live programming demonstration, and a
Q&A session.

We conduct all training sessions remotely using modern video-conferencing tools
to ensure the best learning experience.

This repository contains the teaching material for this course.
The table of contents is at [`./book/src/SUMMARY.md`](./src/SUMMARY.md).

## Booking

See <https://ferrous-systems.com/training> to book or to discuss customising
this material to your needs.

## Learning Goals

These are the questions you will be able to answer after attending this course:

- What is Ferrocene?
- Is Ferrocene a fork of Rust?
- What support is available for Ferrocene?
- What is it like using Ferrocene?

## Timetable

Our standard timetable for this course is as follows:

| Duration | Contents |
| :------: | :--------------------------------------------------- |
| 0:05 | Room open, meet and greet |
| 0:20 | Session 1 - [What is Ferrocene?](#what-is-ferrocene) |
| 0:20 | Session 2 - [A Live Demo](#a-live-demo) |
| 0:15 | Q&A |

## Content

### What is Ferrocene?

- Ferrocene is just Rust
- The downstream model
- The supported host platforms
- The supported target platforms
- ISO 26262 Qualification
- Commercial Support
- The supported platforms

### A Live Demo

- Installing Ferrocene today
- Exploring the installation
- Writing and running an `aarch64-unknown-none` program
- Q&A

## Licence

Ferrous Systems offers our training material under
Expand Down
13 changes: 12 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@

[Front Matter](./front-matter.md)

# What is Ferrocene?

- [Ferrocene is just Rust](./just-rust.md)
- [The downstream model](./downstream-model.md)
- [The supported host platforms](./supported-hosts.md)
- [The supported target platforms](./supported-targets.md)
- [ISO 26262 Qualification](./iso26262.md)
- [Commercial Support](./support.md)
- [The Demo](./demo.md)

# A Live Demo

- [Installing Ferrocene today](./installing.md)
- [Exploring the installation](./exploring.md)
- [Writing and running a program](./writing.md)

# Q&A

- [Q&A](./q-and-a.md)

[Wash-up](./wash-up.md)
1 change: 0 additions & 1 deletion src/demo.md

This file was deleted.

35 changes: 35 additions & 0 deletions src/downstream-model.md
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
# The downstream model

## Some examples

* Enterprise Linux Distributions are a downstream of The Linux Kernel
* The Linux Kernel makes kernel releases
* The Enterprise Linux Vendor then:
* takes the source code,
* runs their test suite,
* adds any required fixes or backports,
* publishes it as open source, and
* sells their customers binaries with a long-term support package

Note:

They are a downstream of a whole bunch of open source packages - GCC, glibc, LibreOffice, bash, etc.

## It's the same model

* Ferrocene is a downstream of The Rust Project
* The Rust Project makes toolchain releases
* Ferrous Systems then:
* takes the source code
* runs their test suite,
* adds any required fixes or backports,
* publishes it as open source, and
* sells their customers binaries with a long-term support package

## Yes, Ferrocene is Open Source

We think it's the world's first open-source qualified toolchain

## Yes, there's Long Term Support

* You can buy support on a commercial basis
* More on this later
45 changes: 45 additions & 0 deletions src/exploring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Exploring the installation

## What do you get?

```console
$ ls -F /opt/ferrocene-23.06
bin/ etc/ lib/ libexec/ share/
$ ls -F /opt/ferrocene-23.06/bin
cargo* ferrocene-self-test* rust-gdb* rust-gdbgui* rust-lldb* rustc* rustdoc*
$ ls -F /opt/ferrocene-23.06/etc
bash_completion.d/
$ ls -F /opt/ferrocene-23.06/lib
librustc_driver-c3ee1e25139c0393.so libstd-8aa647671c2dc036.so
libtest-eab3dde10cbeff80.so rustlib/
$ ls -F /opt/ferrocene-23.06/libexec
cargo-credential-1password* rust-analyzer-proc-macro-srv*
$ ls -F /opt/ferrocene-23.06/share
doc/ man/ zsh/
```

## Is that docs?

```console
$ ls -F /opt/ferrocene-23.06/share/doc/
cargo/ ferrocene/ rust/
$ ls -F /opt/ferrocene-23.06/share/doc/cargo/
LICENSE-APACHE LICENSE-MIT LICENSE-THIRD-PARTY README.md
$ ls -F /opt/ferrocene-23.06/share/doc/rust/
COPYRIGHT LICENSE-APACHE LICENSE-MIT README.md
$ ls -F /opt/ferrocene-23.06/share/doc/ferrocene/
html/
$ open /opt/ferrocene-23.06/share/doc/ferrocene/html/index.html
```

---

![The docs page](./images/docs1.png)

---

![The docs page](./images/docs2.png)

---

![The docs page](./images/docs3.png)
33 changes: 33 additions & 0 deletions src/front-matter.md
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
# Front Matter

## Introduction

In our one hour session on _Why Ferrocene?_ you will learn what Ferrocene is
about, where it is from and where it is going, and whether it is right for you
to look at Ferrocene for your next security-related or safety-critical project.
The agenda includes a short lecture, a live programming demonstration, and a
Q&A session.

We conduct all training sessions remotely using modern video-conferencing tools
to ensure the best learning experience.

This repository contains the teaching material for this course.

## Learning Goals

These are the questions you will be able to answer after attending this course:

- What is Ferrocene?
- Is Ferrocene a fork of Rust?
- What support is available for Ferrocene?
- What is it like using Ferrocene?

## Timetable

Our standard timetable for this course is as follows:

| Duration | Contents |
| :------: | :--------------------------------------------------- |
| 0:05 | Room open, meet and greet |
| 0:20 | Session 1 - What is Ferrocene? |
| 0:20 | Session 2 - A Live Demo |
| 0:15 | Q&A |
Binary file added src/images/docs1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/docs2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/docs3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/rolling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/installing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Installing Ferrocene today

## Ferrocene 23.06

* Ships as tarballs
* Unpack tarballs into, e.g. `/opt/ferrocene-23.06`

## Step-by-step

1. Set up Ubuntu 18.04 for AMD64
2. Install:
* `gcc-aarch64-linux-gnu`
* `gcc` and `build-essential`
* `xz-utils`
3. `mkdir /opt/ferrocene-23.06`
4. `tar xvf <tarball> -C /opt/ferrocene-23.06`
5. Modify `~/.bashrc` to put `/opt/ferrocene-23.06/bin` in your `$PATH`

I use Docker for this. YMMV.

70 changes: 70 additions & 0 deletions src/iso26262.md
Original file line number Diff line number Diff line change
@@ -1 +1,71 @@
# ISO 26262 Qualification

## Quality is a process

* You can't pour a bucket of quality into a finished product
* It's a process you follow throughout the product life-cycle
* You might follow a process that is in accordance with a published ISO standard

## Certification and Qualification

* You are responsible for __certifying__ that the development of *your* product
was in accordance with such a standard.
* You might choose tools that are __qualified__ as being suitable for use with
such a standards compliant process

## What is ISO 26262?

> ISO 26262 is intended to be applied to safety-related systems that include one
> or more electrical and/or electronic (E/E) systems and that are installed in
> series production passenger cars with a maximum gross vehicle mass up to 3 500
> kg.
>
> ISO 26262 addresses possible hazards caused by malfunctioning behaviour of E/E
> safety-related systems, including interaction of these systems.
## And that has qualified tools?

ISO 26262-8:2018(E), Section 11.1.b says:

> to provide means for the qualification of the software tool when applicable,
> in order to create evidence that the software tool is suitable to be used to
> support the activities or tasks required by the ISO 26262 series of standards
> (i.e. the user can rely on the correct functioning of a software tool for
> those activities or tasks required by the ISO 26262 series of standards).
## Confidence in your Tools

* What is the tool supposed to do?
* Does it do what it is supposed to do?
* Does someone I trust believe it does what it is supposed to do?

## What is the tool supposed to do?

* Rust doesn't have a written specification ... yet.
* So we wrote the Ferrocene Language Specification
* <https://spec.ferrocene.dev>

## Does it do what it is supposed to do?

* Rust already had an __excellent__ test suite
* Our work was mainly __joining the dots__ between the tests and the
specification, and __automating everything__
* Nothing hits our main branch unless the tests pass
* We then documented everything in a Safety Manual

## Does someone I trust believe it does what it is supposed to do?

We sent all our evidence to TÜV SÜD for ISO 26262 and IEC 61508 qualification.

So, far they say:

> ...from the general approach, structure, format and contents of the
> provided artifacts there no major questions or anything missing.
The final qualification results will be announced in due course.

## And I get?

You can purchase from us the digitally-signed Qualification Documents. You can
then provide these to *your* assessor when certifying *your* development
process.
57 changes: 57 additions & 0 deletions src/just-rust.md
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
# Ferrocene is just Rust

## No, really...

* We didn't write a new Rust toolchain
* We qualified The Rust Toolchain

## Non-divergence

One of the Ferrocene pillars is that the standard library and the compiler must not diverge from upstream.

## The model works

We've been doing this since 2021, backporting the `main` branch of `rust-lang/rust` into our tree.

## Patches

* Of course, some changes were required
* So, we upstreamed all of them
* Like [#93717], [#108659], [#111936], [#108898]...
* [#111992], [#112314], [#112418], [#112454], ...

[#93717]: https://github.com/rust-lang/rust/pull/93717
[#108659]: https://github.com/rust-lang/rust/pull/108659
[#111936]: https://github.com/rust-lang/rust/pull/111936
[#108898]: https://github.com/rust-lang/rust/pull/108898
[#111992]: https://github.com/rust-lang/rust/pull/111992
[#112314]: https://github.com/rust-lang/rust/pull/112314
[#112418]: https://github.com/rust-lang/rust/pull/112418
[#112454]: https://github.com/rust-lang/rust/pull/112454

## Virtuous Cycle

* Sometimes we find bugs that upstream missed
* So we upstreamed the fixes
* Like [#108905] or [#114613].

[#108905]: https://github.com/rust-lang/rust/pull/108905
[#114613]: https://github.com/rust-lang/rust/pull/114613

## So what's left?

* Support for the [LynxOS-178] target
* A proprietary safety-critical focussed RTOS
* the temporary implementation [of a feature we proposed] and will implement upstream
* Our build and test infrastructure

[LynxOS-178]: https://www.lynx.com/products/lynxos-178-do-178c-certified-posix-rtos
[of a feature we proposed]: https://github.com/rust-lang/compiler-team/issues/659

## Continuous Test

* We developed our own *Continuous Integration* infrastructure
* Separate and parallel to that used by The Rust Project
* They have different goals!
* Having multiple independent, parallel, rock solid CI pipelines can only
benefit Rust
* Ours produces the artefacts we need for qualification
2 changes: 2 additions & 0 deletions src/q-and-a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Any Questions?

Loading

0 comments on commit d8a3d82

Please sign in to comment.