Expand description
Utilities for implementing cargo-zng-res-{tool} executables.
Note don’t depend on cargo-zng, just copy the source code of the utilities you need.
Constants§
- ZR_APP
- Env var set to package.metadata.zng.about.app or package.name
- ZR_
CACHE_ DIR - Env var set to dir that the tool can use to store intermediary data for the specific request.
- ZR_
CRATE_ NAME - Env var set to package.name in snake_case
- ZR_
DESCRIPTION - Env var set to package.description
- ZR_
FINAL - Env var set when it is running a tool that requested
zng-res::on-final=again. - ZR_HELP
- Env var set when it needs the tool print the help text shown in
cargo zng res --tools. - ZR_
HOMEPAGE - Env var set to package.homepage
- ZR_
LICENSE - Env var set to package.license
- ZR_ORG
- Env var set to package.metadata.zng.about.org or the first package.authors
- ZR_
PKG_ AUTHORS - Env var set to package.authors
- ZR_
PKG_ NAME - Env var set to package.name
- ZR_
QUALIFIER - Env var set to package.metadata.zng.about.qualifier
- ZR_
REQUEST - Env var set to the request file that called the tool.
- ZR_
REQUEST_ DD - Env var set to the request file parent dir.
- ZR_
SOURCE_ DIR - Env var set to the resources source directory.
- ZR_
TARGET - Env var set to the target file implied by the request file name.
- ZR_
TARGET_ DD - Env var set to the target file parent dir.
- ZR_
TARGET_ DIR - Env var set to the resources build target directory.
- ZR_
VERSION - Env var set to package.version
- ZR_
WORKSPACE_ DIR - Env var set to the Cargo workspace directory that is parent to the res source.
Functions§
- display_
path - Format the path in the standard way used by cargo-zng.
- path
- Get a
ZR_path var.