-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e91936c
commit 21574c8
Showing
3 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,28 @@ | ||
# Introduction | ||
# Welcome to Rust with Via | ||
|
||
This website contains complementary material for | ||
[Comprehensive Rust](https://google.github.io/comprehensive-rust/), | ||
an amazing Rust course developed by the Android team at Google. | ||
It is based on the changes we made to the course while running it at | ||
[Via](https://ridewithvia.com/) | ||
to make it more suitable for our Python-centric team. | ||
|
||
Our primary motivation for offering this course was to promote the adoption of Rust within Via. | ||
We believe that Rust's combination of performance, safety, and focus on resilient software aligns well with our organization's goals. | ||
By introducing our colleagues to Rust, we hoped to inspire them to explore its potential benefits and consider incorporating it into their projects. | ||
|
||
The course's objectives were to: | ||
* **Convince students of Rust's value:** Highlight Rust's rich type system, strong performance, and modern tooling. | ||
Demonstrate how Rust's focus on safety can help identify and prevent bugs earlier in the development process, reducing the need for extensive QA and mitigating production issues. | ||
* **Introduce Rust's fundamentals:** Show students that even though Rust definitely has it's complexities, using it to build reliable, performant and useful software is not that hard. | ||
* **Build confidence and motivation:** Equip students with the knowledge and skills necessary to feel comfortable and excited about using Rust in their work. | ||
|
||
The course was attended by approximately 15 developers from our algorithms group. Given their extensive experience with Python, and the fact the the original course seem more oriented towards C++ developers, we made several adjustments to the original curriculum. | ||
Most notably, we added a dedicated section and an exercise on using pyo3 to create native Python extensions. Additionally, we replaced some of the exercises with problems that were more relevant to our team's work. | ||
|
||
To enhance the learning experience, we encouraged students to use VSCode as their development environment. We spent time setting up VSCode with essential tools like rust analyzer, clippy, and rustfmt to streamline their workflow. | ||
|
||
At the conclusion of the workshop, we conducted a survey to gather feedback from the participants. The results were very positive, with 90% of respondents expressing a desire to use Rust in their projects and 80% feeling confident in their ability to do so with appropriate guidance. | ||
You can find the full results [here](url). | ||
|
||
We hope that you will find the materials on this site useful and that they will inspire you to explore Rust further. Happy coding! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Schedule | ||
The course was divided into 4 days and 2 weeks, with each week consisting of 2 consecutive days. | ||
Each day was about 5 hours long, with a 1-hour break for lunch. | ||
|
||
We mostly followed the schedule suggested in the original course, but we made some adjustments to better suit our team's needs, detailed below. | ||
|
||
## Day 1 | ||
We covered the first day of the original course, and the first part of the second day ([Pattern Matching](https://google.github.io/comprehensive-rust/pattern-matching.html)). | ||
We skipped the [Nested Arrays](https://google.github.io/comprehensive-rust/tuples-and-arrays/exercise.html) and [Elevator Events](https://google.github.io/comprehensive-rust/user-defined-types/exercise.html) exercises, and concluded the day with the [Expression Evaluation](https://google.github.io/comprehensive-rust/pattern-matching/exercise.html) exercise. | ||
|
||
## Day 2 | ||
We used the time saved from the first day to open the day with a 45-minutes "why Rust" discussion. | ||
This session provided an opportunity to delve into Rust's unique features and explain how they can benefit our work. | ||
While it might seem unconventional to have this discussion later in the course, we found that it allowed for a more technical and concrete conversation. | ||
|
||
Some of the topics we covered included: | ||
* Rust unique memory model that eliminates memory management bugs without a garbage collector or any runtime. | ||
* Rust's rich type system that allows for expressive and safe code. Specifically we mentioned: | ||
* Unique and shared references types. | ||
* Mutability of a variable in the function signature/declaration. | ||
* Rust's enums that can have data attached to them. | ||
* Functions that can consume variables. | ||
* Rust unique error handling mechanism. | ||
* No object-oriented programming, but focus on composition through traits. | ||
We focused on how these features can help us write more reliable and maintainable code. | ||
* Rust's "Fearless Concurrency" model that allows for safe and efficient parallelism. | ||
* Zero-cost abstractions that allow for high-level programming without sacrificing performance. | ||
* Monomorphization. | ||
* The newtype pattern. | ||
* Modern tooling that makes Rust development a breeze. | ||
* Cargo. | ||
* rustfmt. | ||
* clippy. | ||
* rust-analyzer. | ||
* Documentation generation. | ||
* Easy to write Python extensions. Several known Python projects are using Rust, including | ||
[Pydantic](https://docs.pydantic.dev/latest/), | ||
[Polars](https://pola.rs/), | ||
[Ruff](https://docs.astral.sh/ruff/), | ||
[tokenizers](https://github.com/huggingface/tokenizers), | ||
[orjson](https://github.com/ijl/orjson) | ||
and [cryptography](https://cryptography.io/en/latest/). | ||
* Rust is gaining popularity in the industry. It is used by major companies, and currently in the top 20 most popular languages according to the [TIOBE index](https://www.tiobe.com/tiobe-index/). | ||
* Programming in Rust is fun! It is the most admired language for the 8'th year in a row according to the [Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-admired-and-desired-programming-scripting-and-markup-languages). | ||
* We also discussed some of Rust's drawbacks, including: | ||
* Steeper learning curve. | ||
* Slower compilation times. | ||
* Lack of mature libraries in some domains. |