pub struct BuildScript<'w> { /* private fields */ }
Expand description

A build script. This is the main struct for creating cargo arguments.

Notes

99% of the time, you won’t need this. Instead, use the functions in basic.

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()).

Sets now to true.

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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.