Skip to content

docs: add readmes to the examples#743

Open
huncholane wants to merge 1 commit intorust-cli:mainfrom
huncholane:docs/example-readmes
Open

docs: add readmes to the examples#743
huncholane wants to merge 1 commit intorust-cli:mainfrom
huncholane:docs/example-readmes

Conversation

@huncholane
Copy link

No description provided.

@epage
Copy link
Contributor

epage commented Mar 16, 2026

I feel like this should instead be a combination of

  • top-level doc comment (the what, recommendations for playing with it)
  • code cleanup (the "how it works")
  • maybe a table-of-contents in the main library like we do with clap, see clap's cookbook (key concepts but re-framed less around the implementation)

@huncholane
Copy link
Author

I feel like this should instead be a combination of

* top-level doc comment (the what, recommendations for playing with it)

* code cleanup (the "how it works")

* maybe a table-of-contents in the main library like we do with clap, see [clap's cookbook](https://docs.rs/clap/latest/clap/_cookbook/index.html) (key concepts but re-framed less around the implementation)

I got the inspiration from a python library pocketflow. It's really nice to have a readme inside each individual example. Personally, I prefer to look at github over rust docs, so this is a highly opinionated request and understand if it goes against your vision.

@epage
Copy link
Contributor

epage commented Mar 17, 2026

Interesting that you prefer github. Generally, the feedback I've gotten is

  • People want to look in one place
  • It is confusing when looking at one version of an API to then get examples in a different version

I think we can also offer a better presentation in rustdoc and would still prefer doc comments.

I'm also tempted to move most of these examples to being a file, rather than a directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants