Skip to main content

Compilation

Struct Compilation 

Source
pub struct Compilation<'cfg> {
Show 14 fields pub tests: Vec<(Package, Target, PathBuf)>, pub binaries: Vec<PathBuf>, pub native_dirs: BTreeSet<PathBuf>, pub root_output: PathBuf, pub deps_output: PathBuf, pub host_deps_output: PathBuf, pub host_dylib_path: PathBuf, pub target_dylib_path: PathBuf, pub extra_env: HashMap<PackageId, Vec<(String, String)>>, pub to_doc_test: Vec<Doctest>, pub cfgs: HashMap<PackageId, HashSet<String>>, pub rustdocflags: HashMap<PackageId, Vec<String>>, pub host: String, pub target: String, /* private fields */
}
Expand description

A structure returning the result of a compilation.

Fields§

§tests: Vec<(Package, Target, PathBuf)>

An array of all tests created during this compilation. (package, target, path_to_test_exe)

§binaries: Vec<PathBuf>

An array of all binaries created.

§native_dirs: BTreeSet<PathBuf>

All directories for the output of native build commands.

This is currently used to drive some entries which are added to the LD_LIBRARY_PATH as appropriate.

The order should be deterministic.

§root_output: PathBuf

Root output directory (for the local package’s artifacts)

§deps_output: PathBuf

Output directory for rust dependencies. May be for the host or for a specific target.

§host_deps_output: PathBuf

Output directory for the rust host dependencies.

§host_dylib_path: PathBuf

The path to rustc’s own libstd

§target_dylib_path: PathBuf

The path to libstd for the target

§extra_env: HashMap<PackageId, Vec<(String, String)>>

Extra environment variables that were passed to compilations and should be passed to future invocations of programs.

§to_doc_test: Vec<Doctest>

Libraries to test with rustdoc.

§cfgs: HashMap<PackageId, HashSet<String>>

Features per package enabled during this compilation.

§rustdocflags: HashMap<PackageId, Vec<String>>

Flags to pass to rustdoc when invoked from cargo test, per package.

§host: String§target: String

Implementations§

Source§

impl<'cfg> Compilation<'cfg>

Source

pub fn new<'a>( bcx: &BuildContext<'a, 'cfg>, default_kind: CompileKind, ) -> CargoResult<Compilation<'cfg>>

Source

pub fn rustc_process( &self, pkg: &Package, is_primary: bool, is_workspace: bool, ) -> CargoResult<ProcessBuilder>

See process.

Source

pub fn rustdoc_process( &self, pkg: &Package, target: &Target, ) -> CargoResult<ProcessBuilder>

See process.

Source

pub fn host_process<T: AsRef<OsStr>>( &self, cmd: T, pkg: &Package, ) -> CargoResult<ProcessBuilder>

See process.

Source

pub fn target_runner(&self) -> &Option<(PathBuf, Vec<String>)>

Source

pub fn target_process<T: AsRef<OsStr>>( &self, cmd: T, pkg: &Package, ) -> CargoResult<ProcessBuilder>

See process.

Auto Trait Implementations§

§

impl<'cfg> Freeze for Compilation<'cfg>

§

impl<'cfg> !RefUnwindSafe for Compilation<'cfg>

§

impl<'cfg> !Send for Compilation<'cfg>

§

impl<'cfg> !Sync for Compilation<'cfg>

§

impl<'cfg> Unpin for Compilation<'cfg>

§

impl<'cfg> UnsafeUnpin for Compilation<'cfg>

§

impl<'cfg> !UnwindSafe for Compilation<'cfg>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.