Expecting to define arguments based on data from path src/subcoms/rustlang/{command1,command2,..}
Is there a crate that does this or do we need to make a custom solution?
Currently this solution is being used https://github.com/RXT0112/Zernit/blob/init-new/src/bin/main.rs#L83 (Crate clap) which proved to not be sufficient for our usecase since it requires the arguments to be hard-coded
### Expecting
Expecting to define arguments based on data from path `src/subcoms/rustlang/{command1,command2,..}`
---
Is there a crate that does this or do we need to make a custom solution?
You could write a build script that parses your files and generates the clap (or structopt, or whatever) code.
your build script runs arbitrary Rust code. You read and parse the files however, then you generate Rust code. That Rust code is imported into your main
Relevant: https://doc.rust-lang.org/cargo/reference/build-scripts.html
Relevant: https://doc.rust-lang.org/stable/cargo/reference/build-script-examples.html#code-generation
> You could write a build script that parses your files and generates the clap (or structopt, or whatever) code.
> your build script runs arbitrary Rust code. You read and parse the files however, then you generate Rust code. That Rust code is imported into your main
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently this solution is being used https://github.com/RXT0112/Zernit/blob/init-new/src/bin/main.rs#L83 (Crate clap) which proved to not be sufficient for our usecase since it requires the arguments to be hard-coded
Expecting
Expecting to define arguments based on data from path
src/subcoms/rustlang/{command1,command2,..}Is there a crate that does this or do we need to make a custom solution?
Relevant: https://doc.rust-lang.org/cargo/reference/build-scripts.html
Relevant: https://doc.rust-lang.org/stable/cargo/reference/build-script-examples.html#code-generation
Stale issue message