cargo_libc/lib.rs
1//! cargo-libc: build Rust programs for an older glibc.
2//!
3//! cargo-libc is a Cargo subcommand, `cargo libc`. It builds x86_64 Linux programs on
4//! a current machine for a glibc release you choose, 2.17 through 2.44. It links
5//! against exactly what that release defines, checks the executables' requirements,
6//! and runs tests under a simulation of the target's kernel.
7//!
8//! ```sh
9//! cargo libc build --target x86_64-unknown-linux-gnu.2.17 \
10//! --artifact target/x86_64-unknown-linux-gnu/release/myapp -- --release
11//! ```
12//!
13//! Install the command and read how to use it in the
14//! [user guide](https://github.com/rustcommons/cargo-libc/blob/main/docs/USER-GUIDE.md).
15//!
16//! This library holds the implementation of the `cargo-libc`, `libc-linker`,
17//! `libc-runner`, `libc-cc` and `libc-cxx` executables; its modules are public for
18//! them and for tests.
19#![forbid(unsafe_code)]
20
21pub mod cargo_output;
22pub mod cc;
23pub mod cli;
24pub mod elf;
25pub mod provider;
26pub mod report;
27pub mod simulate;
28pub mod toolchain;
29pub mod version;