Exploring the Rust Standard Library
We earlier discussed the role of the Rust Standard Library in enabling user programs to invoke kernel operations. The following are some of the notable features of the standard library, which we will refer to as std
for brevity:
std
is cross-platform. It provides functionality that hides the differences among underlying platform architectures.std
is available to all Rust crates by default. Theuse
statement gives access to the respective modules and their constituents (traits, methods, structs, and so on). For example, the statementuse std::fs
gives access to the module providing file manipulation operations.std
includes operations on standard Rust primitives (such as integers and floating-point numbers). For example,std::i8::MAX
is a constant implemented in the standard library that specifies the maximum value that can be stored in a variable of type i8.- It implements core data types such as vector, strings, and smart pointers...