Building Reusable Code with Rust [Video]

More Information
Learn
  • Write clean and reusable Rust code for your applications
  • Use loop, map, filter and fold to avoid duplicated code
  • Understand generics and learn to use it to abstract algorithms for multiple data types
  • Define and enforce clear interface using traits
  • Work with macros and compiler plugins for metaprogramming
  • Explore how the standard library uses features such as generics, traits and macros
  • Structure your code with modules and crates and publish them online
About

Rust is the ideal language for writing safe, correct code in a way that won't make you pull your hair out. This course will teach you how to build reusable Rust code so that you can stop copying and pasting code. Write code that can adapt to many different usages.

You will reuse code by using advanced features such as traits, generics and macros. You will work with different forms of code reuse, loops, map, filter and fold to save time and resources. Achieve higher-level reuse without sacrificing runtime performance. Organize your code into modules and crates to publish them to crates.io.

By the end of the course you will be able to avoid code duplication and write clean reusable code.

The code bundle for this video course is available at -
https://github.com/PacktPublishing/Building-Reusable-Code-with-Rust

Style and Approach

This course deepens your understanding of the code reuse mechanisms in Rust, using code examples and examples from the Rust standard library to help you learn how these concepts are applied in the wild. You'll be able to use this knowledge to design and build code that is easy to share and reuse by other developers.

Features
  • Know the concepts of macros and compiler plugins and how they help with more complex projects
  • Use Rust's standard library to build a reusable and easy-to-understand API
  • Hands-on example of how to package your Rust code into reusable crates and publish them on crates.io
Course Length 1 hour 59 minutes
ISBN 9781788399524
Date Of Publication 31 Oct 2018

Authors

Shing Lyu

Shing Lyu is a software engineer and open-source promoter. Shing contributed to Mozilla's Servo and Gecko (Firefox) browser engines using Rust, and is active in Rust study groups, training, and conference talks. Shing is passionate about coding, automated testing, and promoting free and open-source software craftsmanship.