Expand description
The most basic usage for build_script
.
§Notes
99% of the time, all of the public functions in this crate can suffice.
Functions§
- cargo_
mapping - Wrapper for
cargo:KEY=VALUE
. This is metadata, used bylinks
scripts. - cargo_
rerun_ if_ changed - Wrapper for
cargo:rerun-if-changed=PATH
. This tells Cargo when to rerun the script. - cargo_
rerun_ if_ env_ changed - Wrapper for
cargo:rerun-if-env-changed=VAR
. This tells Cargo when to rerun the script. - cargo_
rustc_ cdylib_ link_ arg - Wrapper for
cargo:rustc-cdylib-link-arg=FLAG
. This passes custom flags to a linker for cdylib crates. - cargo_
rustc_ cfg - Wrapper for
cargo:rustc-cfg=KEY[="VALUE"]
. This enable compile-timecfg
settings. - cargo_
rustc_ cfg_ mapping cargo_rustc_cfg()
, but with thevalue
parameter needed.- cargo_
rustc_ env - Wrapper for
cargo:rustc-env=VAR=VALUE
. This sets an environment variable. - cargo_
rustc_ flags - Wrapper for
cargo:rustc-flags=FLAGS
. This passes certain flags to the compiler. - cargo_
rustc_ link_ lib - Wrapper for
cargo:rustc-link-lib=[KIND=]NAME
. This adds a library to link. - cargo_
rustc_ link_ lib_ mapping cargo_rustc_link_lib()
, but with thekind
parameter needed.- cargo_
rustc_ link_ search - Wrapper for
cargo:rustc-link-search=[KIND=]PATH
. This adds to the library search path. - cargo_
rustc_ link_ search_ mapping cargo_rustc_link_search()
, but with thekind
parameter needed.- cargo_
warning - Wrapper for
cargo:warning=MESSAGE
. This displays a warning on the terminal.