Expand description
§cargo_px_env
Utilities to retrieve the environment variables set by cargo px.
When cargo px invokes a code generator, it sets various environment variables that
can be leveraged by the code generator to retrieve information about the workspace.
This crate provides bindings to work with these environment variables instead
of hard-coding their names in your code generator.
Modules§
- error
- Errors that can encountered when loading the environment variables set by
cargo px.
Constants§
- GENERATED_
PKG_ MANIFEST_ PATH_ ENV - The name of the environment variable that contains the path to the manifest of the crate that must be generated.
- WORKSPACE_
ROOT_ DIR_ ENV - The name of the environment variable that contains the path to the root directory of the current workspace.
Functions§
- generated_
pkg_ manifest_ path - Retrieve the path to the manifest of the crate that must be generated.
- workspace_
root_ dir - Retrieve the path to the workspace root directory.