OCT. 12-13 2023

BRUSSELS & ONLINE

Oct 11 2023, 10:00 - 16:00

Refactoring Rust

Rust is undeniably syntax-heavy. There’s a lot of intent to express, and Rust wants you to be explicit. All the extra effort can result in bloated code and hard-to-use APIs. Especially features like the trait system, error handling, and ownership add another layer of complexity that can't be controlled by the usual refactoring techniques we have been teaching for the last decades.

In this hands-on workshop, we refactor a Rust program that has just left the prototyping stage into code that is a delight to read and follow, easy to use, easy to maintain, and that plays along nicely with the ecosystem. We take a real-world program and refactor it piece by piece. As a last step, we will write a new feature for both the original and the refactored version. The comparison will amaze you!

All workshop participants will receive a free 3 month CLion license valid for personal use from our friends at JetBrains.

Target Audience

This workshop is designed for developers who are working on Rust codebases already and are looking to level up their skills.

Contents

  • Part 1: Readable Code

    Rust is a modern, expressive language. We look at tooling, formatting, and naming conventions and see the effective use of existing syntax. Often times there are shortcuts that make things a lot easier! We also see which possibilities exist for polymorphism.

  • Part 2: Structs and Error Handling

    Rust’s error handling makes programming a lot of fun and fantastically safe if you know all the possibilities that they offer. We learn about proper error handling, happy path programming, and learn about the most useful methods of Result and Option.

  • Part 3: Traits

    Traits are our main access for abstraction. We look at conversion traits, the most important derivable traits, and how to connect your application to the existing Rust ecosystem.

  • Part 4: Design Patterns

    Finally, we see which design patterns exist in the world of Rust and how we can apply them. We learn about extension traits, and the builder pattern, and see how ownership changes our API design.

Prerequisites

We will send a detailed list of instructions for preparation, including the installation of compiler toolchains, editors, and recommended plugins. Additionally, we will share a Github project with workshop materials. This information will be provided closer to the workshop date.

About Stefan Baumgartner

Stefan Baumgartner is an architect and developer based in Austria who specializes in serverless technologies. He has authored two books on TypeScript and is also the organizer of the Rust Linz meetup.

Stefan Baumgartner
Book Your Ticket

Workshops Venue

workshop venue picture

The EuroRust workshops will take place in the Comet Louise coworking space in the city center of Brussels. The venue is located at Pl. Stéphanie 20, 1050 Brussels.

Check on Map