This is a quick and fairly broad set of documents to get you started learning Rust.
This is targeted at people who already know at least one programming language, and have a working knowledge of common programming concepts, like lists, iteration, functions, etc.
It's intended to give a hard-and-fast practical overview of the language, focused on laying out common practical issues rather than diving deep into the theory.
This is intended as a crash course into the Rust language, for people who otherwise know how to program, but are not necessarily experts. It is largely example-driven, with short explanation snippets, and small exercises for each section.
Although this was structured initially to support a live workshop, it can be used by oneself. In a live setting an instructor should be present to answer any questions. When used alone, some extra searching or asking a friend may prove useful instead.
SETUP.mdfor installation instructionsDAY_1.mdcovers the language basicsAPPS_1.mdhas some more advanced applicative exercises, which only rely on the info fromDAY_1.mdOPTION_AND_RESULT.mdshows common usage examples of theOptionandResulttypes from the standard libraryCONVERT.mddemonstrates conversions using the commonFrom,TryFrom,Into, andTryIntotraitsDAY_2.mdlooks at common patterns and real life applicationsTHREADS.mdshows thread and channel usage, and has a large exercise to practice almost everything covered so far- extra useful topics:
DERIVE.mdlooks at common#[derive(...)]annotations and their usageMODULES.mdcovers splitting a program into multiple files and modules
This documentation was initially developed during the fall of 2019 at Keysight Technologies, in order to serve as support for an internal workshop on the Rust programming language.
The primary motivation was that, generally a company wanting to adopt Rust for a project wants to make its people productive as quickly as possible.
We developed this because we felt that a lot of other resources were either aimed at beginners, and thus too detailed for intermediate programmers, or were aimed at very advanced users, and hence were too brief. A lot of programmers know several languages, and would like a quick way to become acquainted with Rust and be productive.
The model we tested was a 2-day workshop, with 6 hours per day, in which attendants would have a working Rust setup configured beforehand.
Throughout, we assumed the presence of 2 instructors per 12-16 attendants. The instructors would monitor the attendant's progress, offering extra explanations for points that prove difficult, and pacing the workshop by live-coding some examples.
This proved a auccessful approach, with other team members quickly becoming able to contribute to production Rust code.