Struct cargo::core::compiler::BuildOutput
source · pub struct BuildOutput {
pub library_paths: Vec<PathBuf>,
pub library_links: Vec<String>,
pub linker_args: Vec<(LinkArgTarget, String)>,
pub cfgs: Vec<String>,
pub check_cfgs: Vec<String>,
pub env: Vec<(String, String)>,
pub metadata: Vec<(String, String)>,
pub rerun_if_changed: Vec<PathBuf>,
pub rerun_if_env_changed: Vec<String>,
pub warnings: Vec<String>,
}
Expand description
Contains the parsed output of a custom build script.
Fields§
§library_paths: Vec<PathBuf>
Paths to pass to rustc with the -L
flag.
library_links: Vec<String>
Names and link kinds of libraries, suitable for the -l
flag.
linker_args: Vec<(LinkArgTarget, String)>
Linker arguments suitable to be passed to -C link-arg=<args>
cfgs: Vec<String>
Various --cfg
flags to pass to the compiler.
check_cfgs: Vec<String>
Various --check-cfg
flags to pass to the compiler.
env: Vec<(String, String)>
Additional environment variables to run the compiler with.
metadata: Vec<(String, String)>
Metadata to pass to the immediate dependencies.
rerun_if_changed: Vec<PathBuf>
Paths to trigger a rerun of this build script. May be absolute or relative paths (relative to package root).
rerun_if_env_changed: Vec<String>
Environment variables which, when changed, will cause a rebuild.
warnings: Vec<String>
Warnings generated by this build.
These are only displayed if this is a “local” package, -vv
is used,
or there is a build error for any target in this package.
Implementations§
source§impl BuildOutput
impl BuildOutput
sourcepub fn parse_file(
path: &Path,
library_name: Option<String>,
pkg_descr: &str,
script_out_dir_when_generated: &Path,
script_out_dir: &Path,
extra_check_cfg: bool,
nightly_features_allowed: bool,
targets: &[Target]
) -> CargoResult<BuildOutput>
pub fn parse_file( path: &Path, library_name: Option<String>, pkg_descr: &str, script_out_dir_when_generated: &Path, script_out_dir: &Path, extra_check_cfg: bool, nightly_features_allowed: bool, targets: &[Target] ) -> CargoResult<BuildOutput>
Like BuildOutput::parse
but from a file path.
sourcepub fn parse(
input: &[u8],
library_name: Option<String>,
pkg_descr: &str,
script_out_dir_when_generated: &Path,
script_out_dir: &Path,
extra_check_cfg: bool,
nightly_features_allowed: bool,
targets: &[Target]
) -> CargoResult<BuildOutput>
pub fn parse( input: &[u8], library_name: Option<String>, pkg_descr: &str, script_out_dir_when_generated: &Path, script_out_dir: &Path, extra_check_cfg: bool, nightly_features_allowed: bool, targets: &[Target] ) -> CargoResult<BuildOutput>
Parses the output instructions of a build script.
pkg_descr
— for error messageslibrary_name
— for determining ifRUSTC_BOOTSTRAP
should be allowedextra_check_cfg
— for unstable feature-Zcheck-cfg
sourcepub fn parse_rustc_flags(
value: &str,
whence: &str
) -> CargoResult<(Vec<PathBuf>, Vec<String>)>
pub fn parse_rustc_flags( value: &str, whence: &str ) -> CargoResult<(Vec<PathBuf>, Vec<String>)>
Parses cargo:rustc-flags
instruction.
sourcepub fn parse_rustc_env(
value: &str,
whence: &str
) -> CargoResult<(String, String)>
pub fn parse_rustc_env( value: &str, whence: &str ) -> CargoResult<(String, String)>
Parses cargo:rustc-env
instruction.
Trait Implementations§
source§impl Clone for BuildOutput
impl Clone for BuildOutput
source§fn clone(&self) -> BuildOutput
fn clone(&self) -> BuildOutput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more