Struct build_script::core::BuildScript
source ·
[−]pub struct BuildScript<'w> { /* private fields */ }
Expand description
Implementations
Create a new BuildScript
.
Notes
99% of the time, you won’t need to yse this associated function. The defaults can be used instead
(BuildScript::default()
).
Write and remove all the instructions in the stack, starting from the first.
Wrapper for cargo:rerun-if-changed=PATH
. This tells Cargo when to rerun the script.
Wrapper for cargo:rerun-if-env-changed=VAR
. This tells Cargo when to rerun the script.
Wrapper for cargo:rustc-link-lib=[KIND=]NAME
. This adds a library to link.
Wrapper for cargo:rustc-link-search=[KIND=]PATH
. This adds to the library search path.
Wrapper for cargo:rustc-flags=FLAGS
. This passes certain flags to the compiler.
Wrapper for cargo:rustc-cfg=KEY[="VALUE"]
. This enable compile-time cfg
settings.
Wrapper for cargo:rustc-env=VAR=VALUE
. This sets an environment variable.
Wrapper for cargo:rustc-cdylib-link-arg=FLAG
. This passes custom flags to a linker for
cdylib crates.
Wrapper for cargo:warning=MESSAGE
. This displays a warning on the terminal.
Wrapper for cargo:KEY=VALUE
. This is metadata, used by links
scripts.
Pass a custom instruction. Internally, BuildScript
uses this. This may be used
when build_script
isn’t updated for new instructions yet in the future.
Trait Implementations
Get the default build script. Writer is io::stdout()
.
Notes
99% of the time, you can use this associated function instead.