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



This course is not scheduled as a public course.
It is delivered exclusively as customised training. The content, duration, date, and delivery format are tailored to the customer's requirements and can also be provided in English.

Request customised training

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