What is the most idomatic way to create a project scripts in cargo projects? Node js has scripts in their package.json
and we can run npm run <the_script_name>
to run it. Does cargo has similar feature? For example, I want to perform some operation in my project such running the test and put the coverage in the README.md, or downloading a text file and put it in my repo.
I have 2 alternatives, but I'm looking for other option, if there is any:
- Using cargo build script: but,I don't think this is appropriate since it's not technically building my app, and I want to run it manually, not when I'm building my app.
- Using binary crate. This is one way, but binary create feels like I'm writing shippable program, not for project-related tooling.