Struct escargot::CargoBuild

source ·
pub struct CargoBuild { /* private fields */ }
Expand description

The build subcommand.

Example

escargot::CargoBuild::new()
    .bin("bin_fixture")
    .current_release()
    .current_target()
    .exec()
    .unwrap();

Implementations

Shortcut to create a build subcommand.

See also Cargo.

Example
escargot::CargoBuild::new()
    .exec()
    .unwrap();

Build from name package in workspaces.

Example
escargot::CargoBuild::new()
    .package("escargot")
    .bin("bin_fixture")
    .exec()
    .unwrap();

Build only name binary.

Example
escargot::CargoBuild::new()
    .bin("bin_fixture")
    .exec()
    .unwrap();

Build only name example.

Example
escargot::CargoBuild::new()
    .example("example_fixture")
    .exec()
    .unwrap();

Path to Cargo.toml

Build artifacts in release mode, with optimizations.

Build artifacts in release mode if the current process has, with optimizations.

Build for the target triplet.

Build for the current process’ triplet.

Directory for all generated artifacts

Activate all available features

Do not activate the default feature

Space-separated list of features to activate

Manually pass an argument that is unsupported.

Caution: Passing in -- can throw off the API.

Build the configured target, returning compiler messages.

Provide a proxy for running the built target.

Example
let run = escargot::CargoBuild::new()
    .bin("bin_fixture")
    .current_release()
    .current_target()
    .run()
    .unwrap();
println!("artifact={}", run.path().display());

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.