-
Notifications
You must be signed in to change notification settings - Fork 185
Document feature flags using document-features crate #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add document-features crate as dependency - Document all user-facing features with detailed descriptions - Document any_impl and any_zlib internal features with clear warnings - Add feature flags section to lib.rs documentation - Features now automatically documented in cargo doc output Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
cfb8486 to
c9ba5a6
Compare
|
I made
Could @folkertdev and @jongiddy take a look and double check the docs? With your corrections and improvements, I think we will get to the next step quickly, which is to find a way to ensure #517 doesn't happen again (and is fixed with the next release). Thank you 🙏. |
Byron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, and with the documentation of the internal features I think a follow-up could expand on that, namely to explain why the split of features into any_impl and any_zlib is needed.
(Maybe it's also expected that #517 doesn't expose certain types anymore with zlib-rs)
|
The doc changes look very nice. One unusual aspect of the features is that you can select a different backend without setting
Also, not completely related to the doc changes, now that we have 2 Rust backends, using |
c9ba5a6 to
a6a47a5
Compare
|
Thanks for sharing @jongiddy! I have incorporated your notes, or so I hope, and the docs now render like so:
I probably shouldn't have force-pushed though, and will try to avoid it in future revisions. @jongiddy If you would approve, I'd merge this, knowing that changes to the |


The crate's feature flags, particularly the internal
any_implandany_zlibmarkers, lacked documentation. This PR adds comprehensive feature documentation that appears incargo docoutput.Changes
document-featurescrate to auto-generate feature documentation fromCargo.tomlcommentsany_impl: Marker ensuring a backend is selected (auto-enabled by all backends)any_zlib: Marker for C-based zlib backends (auto-enabled byzlib,zlib-ng,zlib-ng-compat,cloudflare_zlib)rust_backend,zlib-rs,zlib,zlib-ng,zlib-ng-compat,zlib-default,cloudflare_zlib, andminiz-sysResult
Feature documentation now appears in the crate docs under a dedicated "Feature Flags" section:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.