build/
lib.rs

1//! Convenience wrappers for cargo buildscript input/output.
2//!
3//! # Example
4//!
5//! ```rust
6//! build::rerun_if_changed("build.rs"); // only rerun for buildscript changes
7//! build::rustc_cfg("has_buildrs"); // set #[cfg(has_buildrs)]
8//! dbg!(build::cargo()); // path to the cargo executable
9//! dbg!(build::cargo_manifest_dir()); // the directory of the build manifest
10//! ```
11
12/// Inputs to the build script, in the form of environment variables.
13pub mod input;
14/// Outputs from the build script, in the form of `cargo:` printed lines.
15///
16/// _Does not print a leading newline._ Thus, if you ever write to stdout and
17/// don't lock until a trailing newline, these instructions will likely fail.
18pub mod output;
19
20#[doc(no_inline)]
21pub use crate::{input::*, output::*};