Rust 101 – 19: Creating a nice API

Tips and rules for writing good APIs that are easy for other people to use. Try to make them Unsurprising, Flexible, and Obvious.

Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects

This section (Building applications): 18: Dependencies, 19: API design, 20: Tests, 21: Exercise B1, 22: Exercise B2, 23: Exercise B3

Links:

The course materials for this series are developed by tweede golf. You can find more information at github.com/tweedegolf/101-rs and you can sponsor the work at github.com/sponsors/tweedegolf. They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2024 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.

Rust 101 – 18: Dependencies and Cargo.toml

How to describe details of your Rust project with a Cargo.toml file, and how to find and add dependencies (other people’s code).

Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects

This section (Building applications): 18: Dependencies, 19: API design, 20: Tests, 21: Exercise B1, 22: Exercise B2, 23: Exercise B3

Links:

The course materials for this series are developed by tweede golf. You can find more information at github.com/tweedegolf/101-rs and you can sponsor the work at github.com/sponsors/tweedegolf. They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2024 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.

Rust 101 – 17: Exercises for module A3 (part 2)

Finishing off the exercises on Rust traits, designing a customised version of Vec.

Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects

This section (Traits and generics): 12: Traits, 13: Type Params, 14: std Traits, 15: Lifetimes, 16: Exercises A3pt1, 17: Exercises A3pt2

Links:

The course materials for this series are developed by tweede golf. You can find more information at github.com/tweedegolf/101-rs and you can sponsor the work at github.com/sponsors/tweedegolf. They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2024 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.

Rust 101 – 16: Exercises for module A3 (part 1)

Going through some exercises on Rust traits, designing a customised version of Vec.

Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects

This section (Traits and generics): 12: Traits, 13: Type Params, 14: std Traits, 15: Lifetimes, 16: Exercises A3pt1, 17: Exercises A3pt2

Links:

The course materials for this series are developed by tweede golf. You can find more information at github.com/tweedegolf/101-rs and you can sponsor the work at github.com/sponsors/tweedegolf. They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2024 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.

Rust 101 – 15: Lifetime bounds

This time we tackle one of the most tricky areas for a new Rust programmer: lifetimes. The key point is that when we add lifetime bounds ('a or similar) to a function signature, this is not to help Rust compile our function: it’s to help Rust understand the lifetime of our return values, so that it knows how to compile the code that calls this function. The lifetime bounds tell the compiler about the references we return – specifically, how they relate to the references that were passed in.

Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects

This section (Traits and generics): 12: Traits, 13: Type Params, 14: std Traits, 15: Lifetimes, 16: Exercises A3pt1, 17: Exercises A3pt2

Links:

The course materials for this series are developed by tweede golf. You can find more information at github.com/tweedegolf/101-rs and you can sponsor the work at github.com/sponsors/tweedegolf. They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2024 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.