Skip to content
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

add parser functionality to RethCli #9083

Closed
Tracked by #7576
mattsse opened this issue Jun 25, 2024 · 2 comments · Fixed by #9127
Closed
Tracked by #7576

add parser functionality to RethCli #9083

mattsse opened this issue Jun 25, 2024 · 2 comments · Fixed by #9127
Assignees
Labels
A-cli Related to the reth CLI D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jun 25, 2024

with #9082 we now have a rethcli type, we need to integrate args parsing by integrating clap's parser in it.

this can be done by adding functions like

fn parse_args() -> Self where Self: Parser + Sized

https://docs.rs/clap/latest/clap/trait.Parser.html

@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-cli Related to the reth CLI labels Jun 25, 2024
@leruaa
Copy link
Contributor

leruaa commented Jun 26, 2024

Not sure if I fully understood what you want, but I can give a try :)

@mattsse
Copy link
Collaborator Author

mattsse commented Jun 26, 2024

for now we basically should just delegate to the clap::Parser's functions for parse from env args

we also need fn try_parse_from<I, T>(itr: I), then the parse fn simply calls this with the std::env::args_os()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants