Expand description
Tier 2: cargo libc test and cargo libc run execute each target binary
through the libc-runner helper, which Cargo calls as its target runner.
The helper first applies the direct glibc check to the binary (a newer
host glibc would otherwise hide a too-new requirement under the local
runner), then runs it under the kernel simulation from kernel-abi-tools:
the local seccomp filter (host userland, no root) or a container with the
target’s userland. The selection travels from cargo libc to the helper
in CARGO_LIBC_RUN_* environment variables.
Without a runner, and with the local runner, the program uses the host’s glibc. The helper then also compares the program’s GLIBC version requirements with what the host’s libraries define (the same test the loader makes) and refuses to start a program that cannot load there.
Structs§
- Simulation
- What
test/runsimulate.distroexcludeskernel;imageneeds a kernel floor.
Enums§
- Host
Glibc - Whether the host’s glibc can load a program that runs on the host userland.
- Plan
- How one binary will run.
Functions§
- describe
- Describes the plan for
cargo libc test/runoutput. - doctor
cargo libc doctorrunner checks: reports both runners and returns whether the onetest/runwould choose is usable.- host_
glibc - Compare every non-weak GLIBC_* requirement with the versions
definedreports for that library (the loader rejects any missing one). - run_
program - The
libc-runnerentry point:libc-runner PROGRAM [ARGS...]. - runtime_
from_ engine_ args - The OCI runtime named in the engine options (
--runtime Xor--runtime=X), if any.