Rust – Generic Programming (RUST3)

Programming, Rust

You already write Rust apps and want to become a library author. This course focuses on practical work with generic code and abstract interfaces, showing how Rust's strict type system guides safe, reusable API design for libraries.

Hands-on exercises teach building tools at the level of the Rust standard library. You'll learn to use type parameters, design generic data structures, and understand monomorphization and trait-based polymorphism for efficient, safe libraries.

THIS TRAINING COURSE WILL HELP YOU:

  • Design and implement reusable Rust libraries
  • Write generic data structures with type parameters
  • Use traits, monomorphization, and dynamic dispatch
  • Implement efficient containers and iterators
  • Diagnose compile-time errors and lifetime issues

WHO SHOULD ATTEND?

  • Rust developers who write applications
  • Engineers aiming to author libraries
  • Systems programmers needing performance and safety
  • Those familiar with Rust basics and ownership

COURSE LOCATION AND AVAILABLE DATES



Public courses are usually delivered in Czech, but this course is also available in English. We can arrange private training for your team online, at your premises or in our classrooms, and tailor the content to your needs.

For groups of around 4 or more participants, private training can already be comparable in price to booking individual places on a public course. Send us your requirements and we’ll recommend the best format and provide an exact quote.

Request training in English

Course content:

Hide details
  • Creating generic libraries
    1. Rust 2018/2021
    2. Algorithms and data structures
    3. Reusable code
  • Metaprogramming
    1. Generics in Rust
    2. Type parameters
    3. Writing generic code
  • Generics and polymorphism
    1. Unified trait system
    2. Monomorphization
    3. Dynamic dispatch
  • Generic functions
    1. Type inference and substitution
    2. Lifetimes and scopes
    3. Common compile-time errors
  • Generic structures
    1. Implementations and APIs
    2. Associated types
    3. Composing generics
  • Implementing containers
    1. Data storage strategies
    2. Reference counting
    3. Iterators
  • Implementing algorithms
    1. Contiguous data patterns
    2. Iterator-driven algorithms
    3. Helper traits
  • Optimization
    1. Leveraging language features
    2. Moves and copies
    3. Memory allocation strategies
Prerequisites:
Basic Rust knowledge and experience writing applications.
Recommended previous course:
Rust – Advanced Programming (RUST2)
Recommended follow-up course:
Rust – Parallel Programming (RUST4)
Schedule:
3 days (9:00-17:00)
Price per person:
736.00 € ( 890.56 € incl. 21% VAT)

Training and learning environment