Skip to main content

Module simulate

Module simulate 

Source
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/run simulate. distro excludes kernel; image needs a kernel floor.

Enums§

HostGlibc
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/run output.
doctor
cargo libc doctor runner checks: reports both runners and returns whether the one test/run would choose is usable.
host_glibc
Compare every non-weak GLIBC_* requirement with the versions defined reports for that library (the loader rejects any missing one).
run_program
The libc-runner entry point: libc-runner PROGRAM [ARGS...].
runtime_from_engine_args
The OCI runtime named in the engine options (--runtime X or --runtime=X), if any.