Cargo Features
[dependencies]
procenv = { version = "0.1.15", default-features = false, features = ["secrecy", "clap", "validator", "dotenv", "serde", "tracing", "async", "provider", "watch", "watch-async", "file", "toml", "yaml", "json", "file-all", "full"] }
- default = dotenv
-
The
dotenvfeature is set by default wheneverprocenvis added withoutsomewhere in the dependency tree.default-features = false - secrecy full?
-
Enable secrecy::Secret<T> support for secret fields
Enables secrecy
- clap full?
-
Enable clap integration for CLI + env config
Enables clap
Affects
diagnostic_codes::CLI_ERROR… - validator full?
-
Enable validation attributes
Enables validator
Affects
diagnostic_codes::VALIDATION_ERROR,diagnostic_codes::FIELD_VALIDATION_ERROR… - dotenv default full?
-
Enable .env file loading (Phase 9)
Enables dotenvy
- serde file? full?
-
Enable serde serialization for config structs
Enables serde and serde_json
- tracing full?
-
Enable tracing instrumentation
Enables tracing
- async watch-async? = provider
-
Affects
adapter::BlockingAdapter,provider::BoxFuture,provider::AsyncProvider… - provider async? full?
- watch watch-async? = file
-
Hot reload support (Phase E)
Enables crossbeam-channel, notify, and parking_lot
notify:
Hot reload (Phase E)
Affects
procenv::watch… - watch-async = async, watch
- file json? toml? watch? yaml? = serde
-
File format support (Phase 13)
Enable file-based configuration loadingEnables serde_path_to_error
Affects
diagnostic_codes::FILE_NOT_FOUND,diagnostic_codes::FILE_PARSE_ERROR,diagnostic_codes::FILE_MISSING_FIELD,diagnostic_codes::FILE_TYPE_ERROR,procenv::file… - toml file-all? = file
-
Enable TOML file support
Enables toml ^0.9.8
- yaml file-all? = file
-
Enable YAML file support (uses serde-saphyr, the modern serde_yaml replacement)
Enables serde-saphyr ^0.0.10
- json file-all? = file
-
Enable JSON file support (included in file feature)
- file-all full? = json, toml, yaml
-
Enable all file formats
- full = clap, dotenv, file-all, provider, secrecy, serde, tracing, validator
-
Enable all features