Difference between revisions of "Rust"
m (Add link to MIT rust-lang docs) |
|||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Notes on Rust programming language | Notes on Rust programming language | ||
| − | + | == Overview == | |
This local page about the programming language of Rust aims to answer among other questions: How suitable is Rust for embedded development? | This local page about the programming language of Rust aims to answer among other questions: How suitable is Rust for embedded development? | ||
| Line 11: | Line 11: | ||
* https://doc.rust-lang.org/rust-by-example/ | * https://doc.rust-lang.org/rust-by-example/ | ||
| − | Rust | + | MIT mirror of Rust introduction by chapters: |
| + | |||
| + | * https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/book/first-edition/traits.html | ||
| − | + | == [[#top|^]] Installation and Other Specific Notes == | |
| − | |||
Install Rust on Ubuntu: | Install Rust on Ubuntu: | ||
| Line 29: | Line 30: | ||
* https://users.rust-lang.org/t/what-are-the-benefits-of-using-crate-as-translation-unit-instead-of-a-source-file/11423/4 | * https://users.rust-lang.org/t/what-are-the-benefits-of-using-crate-as-translation-unit-instead-of-a-source-file/11423/4 | ||
| + | |||
| + | == [[#top|^]] Rust for Embedded Systems == | ||
| + | |||
| + | Rust language for embedded systems: | ||
| + | |||
| + | * https://docs.rust-embedded.org/book/ | ||
| + | * https://docs.rust-embedded.org/embedonomicon/memory-layout.html | ||
== [[#top|^]] Questions to Answer == | == [[#top|^]] Questions to Answer == | ||
| Line 34: | Line 42: | ||
(1) For what is Rust language 'derive' keyword used? | (1) For what is Rust language 'derive' keyword used? | ||
| − | #[derive(Clone)] | + | #[derive(Clone)] |
| + | |||
| + | #[derive(Default)] | ||
| + | |||
| + | (2) How is the `.await` method working, and is this kind of element called a method in Rust? | ||
| + | |||
| + | (3) Rust `match` construct, is this equal to C switch statement? | ||
| + | |||
| + | (4) what does at or near top of source file `use defmt::*;` mean? | ||
| + | |||
| + | (5) Rust `impl` a keyword? Seeing this in lines like `impl CanTxChannel`. | ||
| + | |||
| + | (6) `.await.unwrap()` versus `.await`? | ||
| + | |||
| + | (7) What is the following forward arrow operator in this context?: | ||
| + | |||
| + | pub async fn <function_name>(var declarations) -> () { ... } | ||
| + | |||
| + | (8) What mean the following top of file lines?: | ||
| + | |||
| + | <pre> | ||
| + | #![no_std] | ||
| + | #![no_main] | ||
| + | </pre> | ||
| + | |||
| + | == [[#top|^]] References Rust and Embassy == | ||
| + | |||
| + | * https://docs.embassy.dev/embassy-sync/git/default/blocking_mutex/raw/struct.CriticalSectionRawMutex.html | ||
| + | |||
| + | * https://doc.rust-lang.org/reference/keywords.html | ||
| − | + | * https://doc.rust-lang.org/reference/inline-assembly.html | |
Latest revision as of 00:25, 3 January 2026
Notes on Rust programming language
Overview
This local page about the programming language of Rust aims to answer among other questions: How suitable is Rust for embedded development?
Rust By Example (RBE) home page here:
MIT mirror of Rust introduction by chapters:
^ Installation and Other Specific Notes
Install Rust on Ubuntu:
Adoption and popularity of Rust:
2025-12-16
Rust crates
^ Rust for Embedded Systems
Rust language for embedded systems:
- https://docs.rust-embedded.org/book/
- https://docs.rust-embedded.org/embedonomicon/memory-layout.html
^ Questions to Answer
(1) For what is Rust language 'derive' keyword used?
#[derive(Clone)]
#[derive(Default)]
(2) How is the `.await` method working, and is this kind of element called a method in Rust?
(3) Rust `match` construct, is this equal to C switch statement?
(4) what does at or near top of source file `use defmt::*;` mean?
(5) Rust `impl` a keyword? Seeing this in lines like `impl CanTxChannel`.
(6) `.await.unwrap()` versus `.await`?
(7) What is the following forward arrow operator in this context?:
pub async fn <function_name>(var declarations) -> () { ... }
(8) What mean the following top of file lines?:
#![no_std] #![no_main]