pub struct Target {
pub llvm_target: String,
pub target_endian: String,
pub target_pointer_width: String,
pub target_c_int_width: String,
pub target_os: String,
pub target_env: String,
pub target_vendor: String,
pub arch: String,
pub data_layout: String,
pub linker_flavor: LinkerFlavor,
pub options: TargetOptions,
}
Everything rustc
knows about how to compile for a specific target.
Every field here must be specified, and has no default value.
Target triple to pass to LLVM.
String to use as the target_endian
cfg
variable.
String to use as the target_pointer_width
cfg
variable.
OS name to use for conditional compilation.
Environment name to use for conditional compilation.
Vendor name to use for conditional compilation.
Architecture to use for ABI considerations. Valid options: "x86",
"x86_64", "arm", "aarch64", "mips", "powerpc", and "powerpc64".
Optional settings with defaults.
Given a function ABI, turn it into the correct ABI for this target.
Minimum integer size in bits that this target can perform atomic
operations on.
Maximum integer size in bits that this target can perform atomic
operations on.
Load a target descriptor from a JSON object.
Search RUST_TARGET_PATH for a JSON file specifying the given target
triple. Note that it could also just be a bare filename already, so also
check for that. If one of the hardcoded targets we know about, just
return it directly.
The error string could come from any of the APIs called, including
filesystem access and JSON decoding.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Converts the value of self
to an instance of JSON
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more