Building Reusable Code with Rust
What you'll 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
Requirements
- Basic knowledge of Rust programing is required.
Description
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.
About the Author
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.
Who this course is for:
- This course will appeal to Rust developers who are already familiar with the language and want to learn how to build Rust libraries that are maintainable and reusable, and have an API that honors Rust conventions.
Featured review
Instructor
Packt are an established, trusted, and innovative global technical learning publisher, founded in Birmingham, UK with over eighteen years experience delivering rich premium content from ground-breaking authors and lecturers on a wide range of emerging and established technologies for professional development.
Packt’s purpose is to help technology professionals advance their knowledge and support the growth of new technologies by publishing vital user focused knowledge-based content faster than any other tech publisher, with a growing library of over 9,000 titles, in book, e-book, audio and video learning formats, our multimedia content is valued as a vital learning tool and offers exceptional support for the development of technology knowledge.
We publish on topics that are at the very cutting edge of technology, helping IT professionals learn about the newest tools and frameworks in a way that suits them.