Crate build_helper [] [src]

This crate contains convenience methods for build scripts.

It provides easy access to the information Cargo provides to build scripts, as well as functions for emitting information back to Cargo.

Compatibility

Features

The following optional features are available:

Reexports

pub extern crate semver;

Modules

bin

Functions for locating toolchain binaries.

cargo

Information related to the Cargo package environment.

metadata

Inter-dependency metadata.

rustc

Functions for communicating with rustc.

target

Target platform information.

Macros

warning

Instructs Cargo to display a warning.

Structs

InvalidInput

Error type indicating a string parse failed due to invalid input.

Triple

Platform triple.

Enums

Atomic

Represents an atomic type supported by a target.

Endianness

Represents the target platform's endianness.

LibKind

Library linkage kind.

Profile

A build profile.

SearchKind

Library search path kind.

Functions

debug

Is this a debug build?

host

Host platform triple.

num_jobs

Number of top-level parallel jobs.

opt_level

Optimisation level.

out_dir

Output directory for build script outputs.

profile

Build profile.

rerun_if_changed

Specify a file or directory which, if changed, should trigger a rebuild.

unix

Is this build targeting a UNIX platform?

warning

Instructs Cargo to display a warning.

windows

Is this build targetting Microsoft Windows?