Struttura del corso

Questa pagina è per l’istruttore del corso.

Fondamenti di Rust

The first four days make up Rust Fundamentals. The days are fast paced and we cover a lot of ground!

Course schedule:

  • Day 1 Morning (3 hours, including breaks)
SegmentDuration
Benvenuti5 minutes
Hello World!20 minutes
Types and Values1 hour and 5 minutes
Flusso di Controllo1 hour
  • Day 1 Afternoon (2 hours and 55 minutes, including breaks)
SegmentDuration
Tuples and Arrays1 hour
Riferimenti50 minutes
User-Defined Types50 minutes
  • Day 2 Morning (3 hours and 5 minutes, including breaks)
SegmentDuration
Benvenuti3 minutes
Pattern Matching50 minutes
Read e Write55 minutes
Generics45 minutes
  • Day 2 Afternoon (3 hours, including breaks)
SegmentDuration
Libreria standard1 hour and 10 minutes
Libreria standard1 hour and 40 minutes
  • Day 3 Morning (2 hours and 15 minutes, including breaks)
SegmentDuration
Benvenuti3 minutes
Gestione della Memoria1 hour and 10 minutes
Smart Pointers45 minutes
  • Day 3 Afternoon (2 hours and 20 minutes, including breaks)
SegmentDuration
Prestito (Borrowing)1 hour
Lifetime1 hour and 10 minutes
  • Day 4 Morning (3 hours and 5 minutes, including breaks)
SegmentDuration
Benvenuti3 minutes
Iteratori45 minutes
Moduli40 minutes
Testare1 hour and 5 minutes
  • Day 4 Afternoon (2 hours, including breaks)
SegmentDuration
Gestione degli errori45 minutes
Unsafe Rust1 hour and 5 minutes

Immersioni profonde

In addition to the 4-day class on Rust Fundamentals, we cover some more specialized topics:

Rust in Android

The Rust in Android deep dive is a half-day course on using Rust for Android platform development. This includes interoperability with C, C++, and Java.

Avrai bisogno di un checkout AOSP. Fai un checkout del corso repository sulla stessa macchina e sposta la directory src/android/ in la radice del tuo checkout AOSP. Ciò garantirà che il sistema di compilazione Android vede i file Android.bp in src/android/.

Assicurati che adb sync funzioni con il tuo emulatore o dispositivo reale e precompila tutti gli esempi di Android che utilizzano src/android/build_all.sh. Leggi lo script per vedere i comandi che esegue e assicurati che funzionino quando li esegui a mano.

Rust in Chromium

The Rust in Chromium deep dive is a half-day course on using Rust as part of the Chromium browser. It includes using Rust in Chromium’s gn build system, bringing in third-party libraries (“crates”) and C++ interoperability.

You will need to be able to build Chromium — a debug, component build is recommended for speed but any build will work. Ensure that you can run the Chromium browser that you’ve built.

Rust su Bare-Metal

The Bare-Metal Rust deep dive is a full day class on using Rust for bare-metal (embedded) development. Both microcontrollers and application processors are covered.

Per la parte del microcontrollore, dovrai acquistare la scheda di sviluppo BBC micro:bit v2 in anticipo. Si dovranno installare un certo numero di pacchetti come descritto nel file welcome page.

Concorrenza in Rust

The Concurrency in Rust deep dive is a full day class on classical as well as async/await concurrency.

Avrai bisogno di creare un nuovo progetto, con nuove dipendenze scaricate e pronte per l’utilizzo. Puoi quindi copiare/incollare gli esempi in src/main.rs per sperimentare attraverso di loro:

cargo init concurrency
cd concurrency
cargo add tokio --features full
cargo run

Formato

Il corso è pensato per essere molto interattivo e si consiglia di lasciare che siano le domande a guidare l’esplorazione di Rust!