[][src]Struct devbox_build::Build

pub struct Build {}

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

impl Build[src]

pub fn new() -> Self[src]

Create new Build instance

pub fn current_dir(&self) -> Dir[src]

Current directory where the build has been run from

impl Build[src]

Accessors for envionment variables set by Cargo when running the script

pub fn cargo_cmd(&self) -> Cmd[src]

Cargo executable command

pub fn rustc_cmd(&self) -> Cmd[src]

Rust compler executable command

pub fn rustc_linker_cmd(&self) -> Cmd[src]

Rust linker executable command

pub fn rustdoc_cmd(&self) -> Cmd[src]

Rust doc executable command

pub fn manifest_dir(&self) -> Dir[src]

Directory containing the project manifest

Project manifest links value

pub fn out_dir(&self) -> Dir[src]

Directory in which all output should be placed

pub fn is_release_build(&self) -> bool[src]

True if cargo profile is release (run with --release)

pub fn has_feature<P: AsRef<str>>(&self, feature: P) -> bool[src]

True if care is being build with feature enabled

pub fn host_triple(&self) -> String[src]

Achitecure triple of the machine running the build

pub fn target_triple(&self) -> String[src]

Achitecure triple of the build binaries

pub fn num_jobs(&self) -> u16[src]

Number of threads to be used by the build

pub fn cfg<P: AsRef<str>>(&self, cfg: P) -> Option<String>[src]

Return configuration (check Cargo documentation above for more info)

Trait Implementations

impl Debug for Build[src]

Auto Trait Implementations

impl RefUnwindSafe for Build

impl Send for Build

impl Sync for Build

impl Unpin for Build

impl UnwindSafe for Build

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.