Skip to content

Support cargo:rustc-env #2

@kennytm

Description

@kennytm

Starting from Rust 1.19 (cargo 0.20.0) (next beta), one may use

println!("cargo:rustc-env=ENVVAR=value");

in the build.rs to define a variable for rustc, allowing code to use

env!("ENVVAR")

vergen could be extended to support this, so user could read the variables without including OUT_DIR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions