-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-environment-variablesArea: environment variablesArea: environment variablesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: EasyExperience: Easy
Description
Problem
Cargo may rewrite the package’s Cargo.toml and move the README file around, relative to the manifest. I would like to include_str!() this README in my lib.rs, but am unable to do so right now, because if I specify include_str!("../../README") it works for development, but I can’t package my crate. Conversely if I specify include_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
Metadata
Metadata
Assignees
Labels
A-environment-variablesArea: environment variablesArea: environment variablesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: EasyExperience: Easy