Closed Zeddicus414 closed 2 years ago
Hi! You can use cargo to make multiple binaries. So you could make one cargo project with a library that contains most of your code and then two small binaries, that either call the clap directly or use klask.
Ahh, that makes tons of sense. I learned something today!
For anyone asking the same question, this SO question has a concise example: https://stackoverflow.com/questions/36604010/how-can-i-build-multiple-binaries-with-cargo
Thank you.
Hi @MichalGniadek, I thought somewhere it was planned, to be able to create a single binary where if no command line arguments are supplied, then the Klask GUI would appear, otherwise, args would get passed to Clap, is this feature still on the roadmap? Or did I just hallucinate this feature altogether?
Hi, basically, I tried doing it this way at the very beginning, but there were some problems. But many people have said that they would like this feature to be implemented, and I finally have some time (and motivation) so I'm probably going to work on this in the near future.
When I make tools using Python's Gooey library, I usually end up wanting a CLI version for myself (and maybe other power-users) and then a GUI for everyone else in the office.
If it's possible to get both a CLI & GUI binary from the same source code, it would be helpful to have an example.
Is this easily possible with conditional compilation or some other method?