Workshop: 2-3 days
Introduction to Rust for Web Developers
Workshop description
According to the Stack Overflow survey, Rust is one of the most beloved programming languages. In recent years, it has also gained popularity. There has never been a better time to become familiar with Rust! Learning a new programming language is always easier when you start with topics within your comfort zone. In this workshop, we will explore the main concepts of Rust by developing web applications. We will cover topics such as ownership and borrowing, concurrency, types and structs, all while building a real-world web app together. If you have a basic understanding of creating web back-ends and APIs, this workshop will get you up to speed with Rust.
This workshop is designed for software developers with little to no experience in Rust. We recommend having prior experience in writing web applications.
Getting Started
We will begin by creating a new project and writing our first lines of Rust code. You will become familiar with new syntax primitives, basic types, expressions, function signatures, and the async/await syntax. Additionally, you will learn how to work with Rust's tooling, such as Cargo and Rust Analyzer.
Ownership and Borrowing
As we add more functionality to our application, we will explore Rust's unique approach to memory management: Ownership and Borrowing. We will delve into the intricacies of this system by examining common situations and understanding how it requires us to rethink application development.
Shared Access in Concurrent Applications
Rust's memory management system is ideal for shared access to data in multi-threaded applications, as it forces us to reconsider how we handle shared memory. In this section, we will learn how to share state across threads, how synchronization primitives function, and the significant role ownership plays.
Structs, Traits, Serialization and Deserialization of Data
In the final part, we will gain insight into Rust's type system by exploring traits and their applications in serializing and deserializing requests and responses.