pub struct Rustc(/* private fields */);
Expand description
Provides utilities for interacting with the Rust compiler through Cargo build instructions.
Implementations§
Source§impl Rustc
impl Rustc
Sourcepub fn link_arg_bin(bin: impl AsRef<str>, flag: impl AsRef<str>)
pub fn link_arg_bin(bin: impl AsRef<str>, flag: impl AsRef<str>)
Passes a linker argument for a specific binary target.
Sourcepub fn link_arg_bins(flag: impl AsRef<str>)
pub fn link_arg_bins(flag: impl AsRef<str>)
Passes a linker argument for all binary targets.
Sourcepub fn link_arg_tests(flag: impl AsRef<str>)
pub fn link_arg_tests(flag: impl AsRef<str>)
Passes a linker argument specifically for test builds.
Sourcepub fn link_arg_examples(flag: impl AsRef<str>)
pub fn link_arg_examples(flag: impl AsRef<str>)
Passes a linker argument specifically for example builds.
Sourcepub fn link_search(
path: impl AsRef<Path>,
kind: impl Into<Option<LinkSearchKind>>,
)
pub fn link_search( path: impl AsRef<Path>, kind: impl Into<Option<LinkSearchKind>>, )
Specifies a directory for the Rust compiler to search for libraries.
Sourcepub fn cfg<'a>(key: impl AsRef<str>, value: impl Into<Option<&'a str>>)
pub fn cfg<'a>(key: impl AsRef<str>, value: impl Into<Option<&'a str>>)
Configures a conditional compilation flag with an optional value.
Sourcepub fn env(var: impl AsRef<str>, value: impl AsRef<str>)
pub fn env(var: impl AsRef<str>, value: impl AsRef<str>)
Sets an environment variable for the build script.
Sourcepub fn cdylib_link_arg(flag: impl AsRef<str>)
pub fn cdylib_link_arg(flag: impl AsRef<str>)
Passes a linker argument specifically for cdylib
builds.
Auto Trait Implementations§
impl Freeze for Rustc
impl RefUnwindSafe for Rustc
impl Send for Rustc
impl Sync for Rustc
impl Unpin for Rustc
impl UnwindSafe for Rustc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more