Skip to Main Content
Rust Programming Cookbook
book

Rust Programming Cookbook

by Claus Matzinger
October 2019
Intermediate to advanced content levelIntermediate to advanced
444 pages
10h 37m
English
Packt Publishing
Content preview from Rust Programming Cookbook

How to do it...

With cargo logged in and ready to go, follow these steps to publish the library to the repository:

  1. Open src/lib.rs and add some code. The crate in our recipe is only going to publish the infamous bubble sort algorithm!
At the moment, crates.io only uses names as identifiers, which means that you can't use the name bubble-sort any longer. However, instead of choosing a new name, we ask you not to publish a copy of this crate under a different name but focus your efforts on crates that are useful to the community.

Here is an implementation from the book Hands-On Data Structures and Algorithms with Rust (https://www.packtpub.com/application-development/hands-data-structures-and-algorithms-rust):

//! This is a non-optimized ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Rust Web Programming

Rust Web Programming

Maxwell Flitton
The Complete Rust Programming Reference Guide

The Complete Rust Programming Reference Guide

Rahul Sharma, Vesa Kaihlavirta, Claus Matzinger

Publisher Resources

ISBN: 9781789530667Supplemental Content