One of the Rust programming language promises is "zero-cost abstraction". Therefore the language itself is pretty conservative about what it incorporates. Types that are basics in other languages, such as string
, or features, such as async
, cannot be part of the language itself because they are costly abstractions. The user may not need them at all, or he may prefer other alternative implementations.
To make those types and functions available nonetheless, they are available as part of the Rust standard library, known as std
. Part of this library, known as the prelude
is imported by default in each .rs
file so you don't have to repeat yourself too much.
Most of the time having this standard library available is not a problem because you run your code on a pretty standard environment: your own computer or a Linux server somewhere in the cloud. However, somet