Closed hdoordt closed 11 months ago
@squell I took the liberty to draft a proposal for a new structure. The main idea is that we define a basic module (A), and some modules that are optional depending on the track that is being taken. I've listed the modules with their topics and the tracks below. Especially the modules further down are not as detailed as I'd like them to be yet, but you'll get the idea. Also, we need to split up the modules into parts that are suitable for single lecture+tutorial sessions. Feel free to add your thoughts on this.
Also, I'd like to think about how we can incorporate the work of @coastalwhite into this (#25).
Get to learn the language
Dependencies: ∅
if else
for in
while
loop
break
and loop
expressionsreturn
static
if let
match
while let
let else
impl
blocks
self
vs &self
vs &mut self
.
-operatorSelf
Option
panic
Result
unwrap
?
-operator[T]
vs &[T]
&str
<T: Trait>
vs where T: Trait
impl Trait
fn
signatures'static
lifetimemove
fn
vs Fn
vs FnMut
vs FnOnce
Box
Vec
Rc
Drop
Deref
& DerefMut
Deref
coercionDevelop larger projects with Rust
Dependencies: A
Learn Rusts concurrency models
Dependencies: A
mpsc::channel
rayon
Atomic*
std::sync::atomic::Ordering
Mutex
async
Rust
Future
async
and await
smol
tokio
embassy
async-std
tokio
spawning
tasksawait
sfutures
crate
Stream
channel
Mutex
Learn to use Rust for web applications
Dependencies: A, B, C.1, C.3
std::net
axum
sqlx
wasm
frontendsserde
Learn to use Rust for systems programming Dependencies: A, C.1, C.2, C.3
async
primitives
mio
Dependencies: A, C3
#![no_std]
and core
#![no_main]
cortex-m-rt
cortex-m
embedded-hal
embassy
Dependencies: A, C1
First thoughts about Rust-as-a-first language (which I had thought about last week as well):
A-for-beginners
and then in a few weeks jump to writing a mutex using unsafe code, say.I.e. I think it's a worthwhile thing but maybe something that needs something separate (Programming-101 using Rust), and then finish it off with lots of ideas and suggestions for students "good first Rust projects", and tell them they continue their journey with the B-modue later.
Notes:
A: add topic on trait objects C: add part on intro to multithreading as the concept may be overwhelming to students that have never written parallel code before E: possibly refer to B1, maybe add part on multiprocessing (fork) F: Add embedded-specific topics on synchronization, atomics, mutexes, possibly on RTOS integration
In teacher's guide #54 , we can suggest pick'n'mixing modules
Add more advanced topics to leaf modules
Possibly add topic on Pin
to systems or async or even A
Another thought: we can add content on macros to B
Rust 101 is meant to be multi purpose. Therefore, we define a set of different learning tracks consisting of several modules of which we define modules and subjects their content is dependent on.
As a start, we can define the following tracks:
We also explore the possiblity of setting up a track that uses Rust as a first programming language. See #25