docs.rs
docs.rs copied to clipboard
Copy crate name, version with feature flags?
In docs.rs, we can copy a crate's name and version to be pasted into Cargo.toml. Is there any way to include feature flags into this?
tower-http = "0.5.1" -> tower-http = { version = "0.5.1", features = ["trace"] }
Hi,
thank you for the idea!
Could you elaborate on how you imagine this to look like? How would we know which features to add here?
Where do you see the advantage over cargo add CRATE VERSION -F feature_name? (where crate and version could be pasted from our output).
Assume, in /features page (Feature flags), we have checkbox beside every feature. We can select features we want. We can then use the Copy button.
I think this is better than cargo add because we can interactively select features and also skip the cargo add step entirely.
It might not be a good idea to include all available features in header dropdown. I believe we can add features from full but I have no idea how they work :)