Hands-On Data Structures and Algorithms with Rust

Learn programming techniques to build effective, maintainable, and readable code in Rust 2018

This is the code repository for , published by Packt.

What is this book about?

Rust has come a long way and is now utilized in several contexts. Its key strengths are its software infrastructure and resource-constrained applications, including desktop applications, servers, and performance-critical applications, not forgetting its importance in systems' programming. This book will be your guide as it takes you through implementing classic data structures and algorithms in Rust, helping you to get up and running as a confident Rust programmer.

This book covers the following exciting features: Design and implement complex data structures in Rust Analyze, implement, and improve searching and sorting algorithms in Rust Create and use well-tested and reusable components with Rust Understand the basics of multithreaded programming and advanced algorithm design Become familiar with application profiling based on benchmarking and testing Explore the borrowing complexity of implementing algorithms

If you feel this book is for you, get your copy today!

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

Following is what you need for this book: This book is for developers seeking to use Rust solutions in a practical/professional setting; who wants to learn essential Data Structures and Algorithms in Rust. It is for developers with basic Rust language knowledge, some experience in other programming languages is required.

With the following software and hardware list you can run all code files present in the book (Chapter 1-12).

Software and Hardware List

Chapter Software required OS required
1-12 rustc, cargo Windows, Linux, MacOS
1-12 Visual Studio Code Windows 7 or later, Linux, or MacOS 10.9+
1-12 Rust for Visual Studio Code Windows 7 or later, Linux, or MacOS 10.9+

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.


  • Chapter name: Lists, Lists, and More Lists, Section name: Linked lists, Page no: 58

    In other words, its a queue (or LIFO—short for Last In First Out) structure.

    should be replaced as

    In other words, its a queue (or FIFO—short for First In First Out) structure.

Related products

  • Hands-On Concurrency with Rust [Packt] [Amazon]

  • Rust Quick Start Guide [Packt] [Amazon]

Get to Know the Author

Claus Matzinger is a software engineer with a very diverse background. After working in a small company maintaining code for embedded devices, he joined a large corporation to work on legacy Smalltalk applications. This led to a great interest in programming languages early on, and Claus became the CTO for a health games start-up based on Scala technology.

Since then, Claus' roles have shifted toward customer-facing roles in the IoT database-technology start-up and, most recently, Microsoft. There, he hosts a podcast, writes code together with customers, and blogs about the solutions arising from these engagements. For more than 5 years, Claus has implemented software to help customers innovate, achieve, and maintain success.

Check out his blog at!

Suggestions and Feedback

Click here if you have any feedback or suggestions.

Information - Updated Sep 12, 2022

Stars: 375
Forks: 77
Issues: 0

Contest Algorithms in Rust

A collection of classic data structures and algorithms, emphasizing usability, beauty and clarity over full generality

Contest Algorithms in Rust

The Algorithms - Rust

All algorithms implemented in Rust (for educational purposes)

The Algorithms - Rust

Rust Algorithms and Data structures

Various algorithms and data structures implemented in Rust

Rust Algorithms and Data structures


This repository contains implementations of a variety of algorithms and datastructures in Rust



Implementations of basic algorithms by rust


Implementations of Algorithms and Data Structures in CLRS, as a way to learn Rust and...

Implementations of Algorithms and Data Structures in CLRS, as a way to learn Rust and Algorithms/Data Structures

Implementations of Algorithms and Data Structures in CLRS, as a way to learn Rust and...

Experiments with RUST and algorithms

Simple library with tests for next alorithms:

Experiments with RUST and algorithms

A collection of useful Rust algorithms

Adding Rust Algorithms as a dependency

A collection of useful Rust algorithms
Facebook Instagram Twitter GitHub Dribbble