Struct escargot::CargoBuild [−][src]
pub struct CargoBuild { /* fields omitted */ }
The build
subcommand.
Example
escargot::CargoBuild::new() .bin("bin_fixture") .current_release() .current_target() .exec() .unwrap();
Methods
impl CargoBuild
[src]
impl CargoBuild
pub fn new() -> Self
[src]
pub fn new() -> Self
Shortcut to create a build
subcommand.
See also Cargo
.
Example
escargot::CargoBuild::new() .exec() .unwrap();
pub fn bin<S: AsRef<OsStr>>(self, name: S) -> Self
[src]
pub fn bin<S: AsRef<OsStr>>(self, name: S) -> Self
pub fn example<S: AsRef<OsStr>>(self, name: S) -> Self
[src]
pub fn example<S: AsRef<OsStr>>(self, name: S) -> Self
Build only name
example.
Example
escargot::CargoBuild::new() .example("example_fixture") .exec() .unwrap();
pub fn release(self) -> Self
[src]
pub fn release(self) -> Self
Build artifacts in release mode, with optimizations.
pub fn current_release(self) -> Self
[src]
pub fn current_release(self) -> Self
Build artifacts in release mode if the current process has, with optimizations.
pub fn target<S: AsRef<OsStr>>(self, triplet: S) -> Self
[src]
pub fn target<S: AsRef<OsStr>>(self, triplet: S) -> Self
Build for the target triple.
pub fn current_target(self) -> Self
[src]
pub fn current_target(self) -> Self
Build for the current process' triple.
pub fn arg<S: AsRef<OsStr>>(self, arg: S) -> Self
[src]
pub fn arg<S: AsRef<OsStr>>(self, arg: S) -> Self
Manually pass an argument that is unsupported.
Caution: Passing in --
can throw off the API.
pub fn exec(self) -> CargoResult<MessageItr>
[src]
pub fn exec(self) -> CargoResult<MessageItr>
Build the configured target, returning compiler messages.
pub fn run(self) -> CargoResult<CargoRun>
[src]
pub fn run(self) -> CargoResult<CargoRun>
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
impl Default for CargoBuild
[src]
impl Default for CargoBuild
Auto Trait Implementations
impl Send for CargoBuild
impl Send for CargoBuild
impl !Sync for CargoBuild
impl !Sync for CargoBuild