Skip to main content

Crate linux_targets

Crate linux_targets 

Source
Expand description

Linux target selection shared by the rustcommons toolchain.

A target is chosen in one of two ways:

  • A distribution preset (--distro sles-12-sp5): supplies the glibc floor, the kernel floor, and a container image with the real userland.
  • Explicit floors (--glibc 2.22, --kernel 4.12, or a versioned target such as x86_64-unknown-linux-gnu.2.22): each is optional. A missing kernel floor means the kernel is not simulated: programs run against the host kernel.

A preset cannot be combined with explicit floors: “SLES 12 SP5 with glibc 2.28” is not a real system. Selection::resolve enforces these rules.

Structs§

Distro
A distribution preset: a kernel floor, a glibc floor, and a test image.
Release
A major.minor release number, such as a kernel (4.12) or glibc (2.22) release. Comparison uses only these two components.
Request
What the user selected, before validation.
Selection
A validated selection.

Functions§

distro
The preset with this id.
distros
All distribution presets from data/distros.tsv.
split_versioned_target
Splits x86_64-unknown-linux-gnu.2.17 into the Rust triple and the glibc floor. A triple without a numeric .X.Y suffix is returned unchanged.

Type Aliases§

GlibcVersion
A GNU C Library release.
KernelVersion
A mainline Linux kernel release.