Document features
This crate makes use of features so that "you don't pay for what you don't use" and to support no_std while allowing for extensions that require the standard library. This is good, but it can be beginner unfriendly. The readme should include a brief overview of the features this crate provides with a beginner friendly presentation.
Sure, would you like to write that up? The current features are:
-
stdenables the full standard library (on by default) -
bigint-stdenablesBigRationalusingstd(on by default) -
bigintenablesBigRationalusing justcoreandalloc(requires Rust 1.36+) -
serdeimplementsDeserializeandSerialize for Ratio<T>
Technically, cargo will accept num-bigint as a feature here too for the optional dependency, but it doesn't actually enable anything in num-rational. I'm now thinking we should simplify that one -- package renaming can let us have just bigint and our added bigint-std, or we can go the other way to full num-bigint and add explicit num-bigint-std instead. Thoughts?
I ran into this myself. I started writing a custom serializer for a Rational type and then realized that it already existed. But I could find no mention of the serde feature anywhere (except by reading the code). Do you want me to submit a PR for a change to the docs?
Sure, a PR to improve docs would be welcome!