12
12
13
13
# The Rust standard library
14
14
15
- The Rust standard library provides runtime features required by the language,
16
- including the task scheduler and memory allocators, as well as library
17
- support for Rust built-in types, platform abstractions, and other commonly
18
- used features.
19
-
20
- `std` includes modules corresponding to each of the integer types, each of
21
- the floating point types, the `bool` type, tuples, characters, strings
22
- (`str`), vectors (`vec`), managed boxes (`managed`), owned boxes (`owned`),
23
- and unsafe and borrowed pointers (`ptr`). Additionally, `std` provides
24
- pervasive types (`option` and `result`), task creation and communication
25
- primitives (`task`, `comm`), platform abstractions (`os` and `path`), basic
26
- I/O abstractions (`io`), common traits (`kinds`, `ops`, `cmp`, `num`,
27
- `to_str`), and complete bindings to the C standard library (`libc`).
15
+ The Rust standard library is a group of interrelated modules defining
16
+ the core language traits, operations on built-in data types, collections,
17
+ platform abstractions, the task scheduler, runtime support for language
18
+ features and other common functionality.
19
+
20
+ `std` includes modules corresponding to each of the integer types,
21
+ each of the floating point types, the `bool` type, tuples, characters,
22
+ strings (`str`), vectors (`vec`), managed boxes (`managed`), owned
23
+ boxes (`owned`), and unsafe and borrowed pointers (`ptr`, `borrowed`).
24
+ Additionally, `std` provides pervasive types (`option` and `result`),
25
+ task creation and communication primitives (`task`, `comm`), platform
26
+ abstractions (`os` and `path`), basic I/O abstractions (`io`), common
27
+ traits (`kinds`, `ops`, `cmp`, `num`, `to_str`), and complete bindings
28
+ to the C standard library (`libc`).
28
29
29
30
# Standard library injection and the Rust prelude
30
31
@@ -38,7 +39,7 @@ with the `std::` path prefix, as in `use std::vec`, `use std::task::spawn`,
38
39
etc.
39
40
40
41
Additionally, `std` contains a `prelude` module that reexports many of the
41
- most common `std` modules, types and traits . The contents of the prelude are
42
+ most common types, traits and functions . The contents of the prelude are
42
43
imported into every *module* by default. Implicitly, all modules behave as if
43
44
they contained the following prologue:
44
45
0 commit comments