Skip to content

Build script access environment at compile time instead of at build time #22

Closed
@redsun82

Description

@redsun82

The build script uses env!("CARGO_PKG_VERSION"), relying on that variable being set by cargo when the build script is compiled. However, the docs state that inputs to the build script are passed at run time (of the build script):

When the build script is run, there are a number of inputs to the build script, all passed in the form of environment variables.

(emphasis mine)

In particular, that is for example what the bazel wrapper around rust rules expects, so that any crate depending on this one will fail to build with bazel.

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