Home > On-Demand Archives > Talks >

Rust for Embedded Developers: The Peripheral Access Crate

Jacob Beningo - Watch Now - Duration: 46:16

Rust for Embedded Developers: The Peripheral Access Crate
Jacob Beningo

The C programming language has dominated embedded software development for the last 50 years. Despite other languages coming and going, C has withstood the winds of change. The latest language to challenge C’s dominance is Rust. Rust is a system programming language offering modern features, including memory safety.

In this session, we will explore the Rust programming language from an embedded developer’s perspective. We will look at the peripheral access crate (PAC), and examine how to develop low-level drivers. As an example, we’ll look at creating a blinky hello world application and then move on to a serial peripheral driver. Attendees will walk away, understanding the advantages and disadvantages of using Rust in an embedded system.

Topics covered in this talk will include:

  • The Peripheral Access Crate (PAC)
  • How to create a PAC
  • Advantages and Disadvantages of Rust in embedded systems
  • Rust fundamentals
  • How Rust fits into the industry in the big picture
M↓ MARKDOWN HELP
italicssurround text with
*asterisks*
boldsurround text with
**two asterisks**
hyperlink
[hyperlink](https://example.com)
or just a bare URL
code
surround text with
`backticks`
strikethroughsurround text with
~~two tilde characters~~
quote
prefix with
>

MarkBremer
Score: 0 | 6 days ago | 1 reply

I think your explanation of a crate isn't quite right. A crate can contain multiple .rs files and is more similar to a library. Crates can contain multiple modules, which is closer to what you're explaining, where each .rs file is, by default, a single module (you can also define multiple modules in a single file if you'd like).

Jacob_BeningoSpeaker
Score: 0 | 2 days ago | 1 reply

Thanks for the comment. I think the language is a bit ambiguous.
A quick search I found this:

In Rust, a crate is a compilation unit, which can be thought of as a package or a library. It is the fundamental building block of a Rust project, similar to a package in other programming languages.

So an individual .rs file can be considered a crate. However, if you a project that will be used as a library or package, that could also be considered a crate.

So in my example, we had many .rs files in that we compiled into a single library crate for the L475. Then we used that single crate in a project that had a single .rs file.

I agree I could have been more clear on the definition!

MarkBremer
Score: 0 | 2 days ago | no reply

Fair enough. Great talk though!

OUR SPONSORS

OUR PARTNERS