[−][src]Struct rustwide::Build
API to interact with a running build.
This is created from BuildDirectory::build
Methods
impl<'_> Build<'_>
[src]
pub fn cmd<R: Runnable>(&self, bin: R) -> Command
[src]
Run a command inside the sandbox.
Any cargo
invocation will automatically be configured to use a target directory mounted
outside the sandbox. The crate's source directory will be the working directory for the
command.
Example
let mut build_dir = workspace.build_dir("foo"); build_dir.build(&toolchain, &krate, sandbox).run(|build| { build.cmd("rustfmt").args(&["--check", "src/main.rs"]).run()?; Ok(()) })?;
pub fn cargo(&self) -> Command
[src]
Run cargo
inside the sandbox, using the toolchain chosen for the build.
cargo
will automatically be configured to use a target directory mounted outside the
sandbox. The crate's source directory will be the working directory for the command.
Example
let mut build_dir = workspace.build_dir("foo"); build_dir.build(&toolchain, &krate, sandbox).run(|build| { build.cargo().args(&["test", "--all"]).run()?; Ok(()) })?;
pub fn host_source_dir(&self) -> PathBuf
[src]
Get the path to the source code on the host machine (outside the sandbox).
pub fn host_target_dir(&self) -> PathBuf
[src]
Get the path to the target directory on the host machine (outside the sandbox).
Auto Trait Implementations
impl<'b> !RefUnwindSafe for Build<'b>
impl<'b> Send for Build<'b>
impl<'b> Sync for Build<'b>
impl<'b> Unpin for Build<'b>
impl<'b> !UnwindSafe for Build<'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,