pub struct TargetInfo {
    pub sysroot: PathBuf,
    pub sysroot_host_libdir: PathBuf,
    pub sysroot_target_libdir: PathBuf,
    pub rustflags: Vec<String>,
    pub rustdocflags: Vec<String>,
    pub supports_split_debuginfo: bool,
    /* private fields */
}
Expand description

Information about the platform target gleaned from querying rustc.

RustcTargetData keeps two of these, one for the host and one for the target. If no target is specified, it uses a clone from the host.

Fields

sysroot: PathBuf

Path to the sysroot.

sysroot_host_libdir: PathBuf

Path to the “lib” or “bin” directory that rustc uses for its dynamic libraries.

sysroot_target_libdir: PathBuf

Path to the “lib” directory in the sysroot which rustc uses for linking target libraries.

rustflags: Vec<String>

Extra flags to pass to rustc, see env_args.

rustdocflags: Vec<String>

Extra flags to pass to rustdoc, see env_args.

supports_split_debuginfo: bool

Whether or not rustc supports the -Csplit-debuginfo flag.

Implementations

All the target cfg settings.

Returns all the file types generated by rustc for the given mode/target_kind.

The first value is a Vec of file types generated, the second value is a list of CrateTypes that are not supported by the given target.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.