Rust Standard Library
Learn about the Rust standard library (std) and its functionalities.
We know we can import libraries that have been prewritten for us or that we ourselves have prewritten using Rust. One of the most useful libraries that we’ll be using is the Rust standard library, which is a part of every Rust project by default—in some cases, we don’t even have to import it!
Components of the std
library
This library contains all the primitive data types, the core types, and even smart pointers. The table below shows different components of the Rust standard library and gives a detailed breakdown of which modules we can use for which purpose and whether we’ll need to import them into the project or not. For example, a hash map is very useful for storing and retrieving data, and it can be imported using the HashMap
module from the std
library.
Get hands-on with 1400+ tech skills courses.