This is my Rust template for new CLI apps.
- Just enabled project build targets.
- Clap CLI argument parser.
- Bash / Fish / Zsh shell (tab) completion.
- GitHub actions for tests and releases:
- Builds executables for multiple platforms.
- Builds Docker images for x86_64 and aarch64.
- Test coverage report published to GitHub pages.
- Publishing crates to crates.io (disabled by default, uncomment in release.yml).
- Create a new repository using this template.
- The
Repository namethat you choose will also be used as your new app's name. - If you have enabled code coverage reports (it's on by default), go
to the GitHub repository
Settingspage:- Find
Pages. - Find
Build and deployment. - Find
Sourceand set it toGitHub Actions. (NotDeploy from a branch)
- Find
## For example:
git clone [email protected]:${USERNAME}/${REPOSITORY}.git \
~/git/vendor/${USERNAME}/${REPOSITORY}
cd ~/git/vendor/${USERNAME}/${REPOSITORY}
After cloning the repository to your workstation, you must initialize it:
./setup.sh
This will render the template files into the project root and then self-destruct this README.md and the template.
It will also build and run the initial tests. Importantly, this will also create the Cargo.lock file for the first time.
just run [ARGS ...]
You can also run the binary directly by building manually (just build) and running the static binary
{{app_name}}/target/debug/{{app_name}}.
Once you've verified that the tests ran correctly, you can add all of
the files the template generated, as well as the Cargo.lock file,
into the git repository. Commit and push your changes:
## For example:
git add .
git commit -m "init"
git push
You're now ready to start developing your application.
See DEVELOPMENT.md for instructions on the release process, a copy of this file has been included in your new git repository's root.