Set the CARGO_PKG_README
environment variable
#11597
Labels
A-environment-variables
Area: environment variables
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
E-easy
Experience: Easy
Problem
Cargo may rewrite the package’s
Cargo.toml
and move the README file around, relative to the manifest. I would like toinclude_str!()
this README in mylib.rs
, but am unable to do so right now, because if I specifyinclude_str!("../../README")
it works for development, but I can’t package my crate. Conversely if I specifyinclude_str!("../README")
it works when packaged, but not during development.Proposed Solution
Having an environment variable that would tell me where to find the README file would probably be the most straightforward option.
Notes
No response
The text was updated successfully, but these errors were encountered: