Expand description
cargo-libc: build Rust programs for an older glibc.
cargo-libc is a Cargo subcommand, cargo libc. It builds x86_64 Linux programs on
a current machine for a glibc release you choose, 2.17 through 2.44. It links
against exactly what that release defines, checks the executables’ requirements,
and runs tests under a simulation of the target’s kernel.
cargo libc build --target x86_64-unknown-linux-gnu.2.17 \
--artifact target/x86_64-unknown-linux-gnu/release/myapp -- --releaseInstall the command and read how to use it in the user guide.
This library holds the implementation of the cargo-libc, libc-linker,
libc-runner, libc-cc and libc-cxx executables; its modules are public for
them and for tests.
Modules§
- cargo_
output - Extract executable paths from Cargo’s JSON output without external crates.
- cc
- Compiler wrappers for C dependencies (
libc-cc, andlibc-cxxto refuse C++). - cli
- elf
- Read the dynamic dependency metadata of Linux x86-64 ELF files.
- provider
- Versioned local provider descriptor. This is a trusted build configuration, not a signed or redistributable SDK.
- report
- simulate
- Tier 2:
cargo libc testandcargo libc runexecute each target binary through thelibc-runnerhelper, which Cargo calls as its target runner. - toolchain
- version