Book Image

Rust Essentials

By : Ivo Balbaert
Book Image

Rust Essentials

By: Ivo Balbaert

Overview of this book

<p>Starting by comparing Rust with other programming languages, this book will show you where and how to use Rust. It will discuss primitive types along with variables and their scope, binding and casting, simple functions, and ways to control execution flow in a program.</p> <p>Next, the book covers flexible arrays, vectors, tuples, enums, and structs. You will then generalize the code with higher-order functions and generics applying it to closures, iterators, consumers, and so on. Memory safety is ensured by the compiler by using references, pointers, boxes, reference counting, and atomic reference counting. You will learn how to build macros and crates and discover concurrency for multicore execution.</p> <p>By the end of this book, you will have successfully migrated to using Rust and will be able to use it as your main programming language.</p>
Table of Contents (17 chapters)
Rust Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The ecosystem of crates


There is a general tendency to move less-used or more experimental Application Programming Interfaces (APIs) out of the language and the standard library and into their own crates. An ever-growing ecosystem of crates for Rust is at your disposal at https://crates.io/, with over 2,000 crates in stock at the time of writing (May 2015).

At Awesome Rust (https://github.com/kud1ing/awesome-rust), you can find a curated list of Rust projects. This site only contains useful and stable projects and indicates whether they compile in the latest Rust version. In addition, it is worth to search Rust Kit (http://rustkit.io/), as well as the Rust-CI repository at http://www.rust-ci.org/projects/.

In general, it is advisable that you search for crates that are already available whenever you embark on a project that requires specific functionality. There is a good chance that a crate that conforms to your needs already exists, or perhaps, you can find some usable starting code upon which you can build what you exactly need.