json icon indicating copy to clipboard operation
json copied to clipboard

Document features

Open fenhl opened this issue 2 years ago • 3 comments

There are some cargo features that appear to modify the behavior of the crate, but it is not clear what exactly they do. It would be useful to have an overview of the following features in the crate-level docs:

  • preserve_order
  • raw_value
  • unbounded_depth
  • arbitrary_precision
  • float_roundtrip

fenhl avatar Sep 13 '21 04:09 fenhl

I found docs in https://github.com/serde-rs/json/blob/master/Cargo.toml but these can be made easier to find :)

jpmckinney avatar Dec 15 '21 21:12 jpmckinney

Perhaps the docs could point to the Cargo.toml? The Cargo.toml contains the ground truth - the feature names, the inter-feature dependencies, and the feature docs, all in one place. If that information was mirrored in another place, every feature change would need to be updated in two places and there would be a high risk of drifting out of sync

(I wish rustdoc could extract doc comments on features inside Cargo.toml)

kangalio avatar May 23 '23 18:05 kangalio

https://docs.rs/document-features/latest/document_features/ can extract comments from Cargo.toml

jayvdb avatar Jun 28 '23 02:06 jayvdb