pub struct Build {}
Expand description
Represents the build itself encaspsulating Cargo environment variables
You start the srcript by creating new Build
instance which provides further access to
project directories and standard Cargo environment variables.
For more info on Cargo environement variables check [Cargo env variables] [Cargo env variables]: https://doc.rust-lang.org/cargo/reference/environment-variables.html
Implementations§
Source§impl Build
impl Build
Sourcepub fn current_dir(&self) -> Dir
pub fn current_dir(&self) -> Dir
Current directory where the build has been run from
Source§impl Build
Accessors for envionment variables set by Cargo when running the script
impl Build
Accessors for envionment variables set by Cargo when running the script
Sourcepub fn rustc_linker_cmd(&self) -> Cmd
pub fn rustc_linker_cmd(&self) -> Cmd
Rust linker executable command
Sourcepub fn rustdoc_cmd(&self) -> Cmd
pub fn rustdoc_cmd(&self) -> Cmd
Rust doc executable command
Sourcepub fn manifest_dir(&self) -> Dir
pub fn manifest_dir(&self) -> Dir
Directory containing the project manifest
Sourcepub fn manifest_links(&self) -> String
pub fn manifest_links(&self) -> String
Project manifest links
value
Sourcepub fn is_release_build(&self) -> bool
pub fn is_release_build(&self) -> bool
True if cargo profile is release
(run with –release)
Sourcepub fn has_feature<P: AsRef<str>>(&self, feature: P) -> bool
pub fn has_feature<P: AsRef<str>>(&self, feature: P) -> bool
True if care is being build with feature
enabled
Sourcepub fn host_triple(&self) -> String
pub fn host_triple(&self) -> String
Achitecure triple of the machine running the build
Sourcepub fn target_triple(&self) -> String
pub fn target_triple(&self) -> String
Achitecure triple of the build binaries