1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-02 02:56:26 +02:00

Add initial outline for bare-metal Rust day.

This commit is contained in:
Andrew Walbran 2023-02-01 15:53:34 +00:00
parent 036269ec94
commit 51ccf44f52
3 changed files with 66 additions and 0 deletions

View File

@ -233,6 +233,32 @@
----
# Day 5A: Morning
- [Welcome](welcome-no_std.md)
- [`no_std`](no_std/no_std.md)
- [`core`]()
- [`alloc`]()
- [Microcontrollers]()
- [PACs]()
- [HAL crates]()
- [The type state pattern]()
# Day 5A: Afternoon
- [Application processors]()
- [MMIO]()
- [Let's write a UART driver]()
- [Logging]()
- [Useful crates]()
- [`zerocopy`]()
- [`aarch64_paging`]()
- [`buddy_system_allocator`]()
- [`tinyvec`]()
- [`spin` and `once_cell`]()
---
# Solutions
----

39
src/no_std/no_std.md Normal file
View File

@ -0,0 +1,39 @@
# `no_std`
## `core`
* Slices, `&str`, `CStr`
* `NonZeroU8`...
* `Option`, `Result`
* `Display`, `Debug`, `write!`...
* `Iterator`
* `panic!`, `assert_eq!`...
* `NonNull` and all the usual pointer-related functions
* `Future` and `async`/`await`
* `fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...
* `Duration`
## `alloc`
* `Box`, `Cow`, `Arc`, `Rc`
* `Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`
* `String`, `CString`, `format!`
## `std`
* `Error`
* `HashMap`
* `Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`
* `File` and the rest of `fs`
* `println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`
* `Path`, `OsString`
* `net`
* `Command`, `Child`, `ExitCode`
* `spawn`, `sleep` and the rest of `thread`
* `SystemTime`, `Instant`
<details>
* `HashMap` depends on RNG.
</details>

1
src/welcome-no_std.md Normal file
View File

@ -0,0 +1 @@
# Welcome to `no_std`