This series of training provide hands-on Rust training material through progressive exercises and examples.
It focuses on core Rust concepts such as ownership, borrowing, lifetimes, and error handling.
Designed for self-learning or workshops, it helps developers build a strong foundation in Rust.
This repository contains materials for a 2-3 day Rust training course.
The training is designed not to replace The Rust Programming Language book (commonly called "the Rust book"), but rather to provide you with solid foundational knowledge. After completing this training, you'll find the Rust book easier to understand because you'll already be familiar with the core concepts.
This training is intended for developers who already have proficiency in at least one other programming language.
Learning Rust effectively requires time and practice. While this training will accelerate your learning process, please note that it alone won't make you proficient in Rust.
We recommend the following learning path:
- Complete this training course
- Utilize official rust-lang resources:
- Read the entire Rust book
- Simultaneously, practice with Rustlings exercises
- Apply your knowledge by working on a small Rust project of your choice
There is no OS requirement for this training so all examples should run on any OS/distribution combo.
- Install Rust by downloading the
rustuppackage of your Linux distribution or by following instructions at: https://www.rust-lang.org/learn/get-started - Install VSCode or VSCodium
- Install RustAnalyzer plugin (official rust-lang plugin): https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer
- Clone this repository with
git clone(so that you'll be able to refresh it easily to get all content at workshop time) - Open it in VSCode
- Optional:
right-clickon theREADME.mdfile in the left panel and click on Open Preview
- Optional:
- Navigate to test
- You are supposed to see a Rust
mainfunction with a little play button on top - Click that play button
- You should see a bottom panel opening with the message to print
- You are supposed to see a Rust
- If the above step completed successfully, everything is ready
Here are some memos you can use in order to help you to quickly remember what we have seen in this training
- Rust guarantees
- Primitive types
- Control flow
- Destructuring
- Ownership
- Items privacy
- Struct enum
- Option & Result enums
- Generics
- Traits
- Lifetimes
All the materials are dual-licensed under GNU Affero General Public License version 3 or later and the Creative Commons Attribution-ShareAlike 4.0 International. You can use either one of the licenses depending of your use case of the training materials.
Co-funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Cybersecurity Competence Centre. Neither the European Union nor the granting authority can be held responsible for them.
This repository is part of the NGSOTI project. Project: 101127921 NGSOTI DIGITAL‑ECCC‑2022‑CYBER‑03