pub struct RustcTargetData<'cfg> {
    pub rustc: Rustc,
    config: &'cfg Config,
    requested_kinds: Vec<CompileKind>,
    host_config: TargetConfig,
    host_info: TargetInfo,
    target_config: HashMap<CompileTarget, TargetConfig>,
    target_info: HashMap<CompileTarget, TargetInfo>,
}
Expand description

Collection of information about rustc and the host and target.

Fields§

§rustc: Rustc

Information about rustc itself.

§config: &'cfg Config

Config

§requested_kinds: Vec<CompileKind>§host_config: TargetConfig

Build information for the “host”, which is information about when rustc is invoked without a --target flag. This is used for procedural macros, build scripts, etc.

§host_info: TargetInfo

Information about the host platform.

§target_config: HashMap<CompileTarget, TargetConfig>

Build information for targets that we’re building for.

§target_info: HashMap<CompileTarget, TargetInfo>

Information about the target platform that we’re building for.

Implementations§

Insert kind into our target_info and target_config members if it isn’t present yet.

Returns a “short” name for the given kind, suitable for keying off configuration in Cargo or presenting to users.

Whether a dependency should be compiled for the host or target platform, specified by CompileKind.

Gets the list of cfgs printed out from the compiler for the specified kind.

Information about the given target platform, learned by querying rustc.

Gets the target configuration for a particular host or target.

If a build script is overridden, this returns the BuildOutput to use.

lib_name is the links library name and kind is whether it is for Host or Target.

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.

Should always be Self
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.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 1088 bytes