Biblioteca estándar

Rust comes with a standard library which helps establish a set of common types used by Rust libraries and programs. This way, two libraries can work together smoothly because they both use the same String type.

In fact, Rust contains several layers of the Standard Library: core, alloc and std.

  • core includes the most basic types and functions that don't depend on libc, allocator or even the presence of an operating system.
  • alloc incluye tipos que requieren un allocator de heap global, como Vec, Box y Arc.
  • Las aplicaciones embebidas en Rust menudo solo usan core y a algunas veces alloc.