-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Create CLI documentation with a Rust script (instead of Python) + style improvement #10680
Conversation
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.
personally love this, we should give some love to the cargo script feature. curious what others think cc @mattsse @DaniPopes @rkrasiuk @Rjected
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.
Yeah, this is way better, thanks! Also needs to install nightly in CI
This was adapted from the Foundry book (https://github.com/foundry-rs/book/blob/8f8215a10248f8e4d4870e3c03dd836d64169fd1/scripts/gen_output/help.py#L1), would you mind also opening a PR there too?
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.
epic, looks like the current book CI lint uses a stable toolchain, so you will have to install the nightly toolchain as well in the lint workflow
+ add Rust nightly to GitHub book lint job
This change was merged in Foundry: foundry-rs/book#1281 I've also added Rust nightly to the GitHub workflow file |
I noticed that the CLI documentation was being generated using a Python script, so I rewrote it in Rust to make it easier to understand and more maintainable. Although it’s not a 1-to-1 conversion, I aimed to stay close to the original implementation to facilitate the review process. The output remains identical.
Additionally, I made a small change to the Markdown template (in a separate commit) to enhance the appearance of the generated documentation: