My opinionated Rust template
- Install Cargo Binstall
https://github.com/cargo-bins/cargo-binstall#installation
$ curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
# or if you dont like piping random crap into your shell
$ cargo install cargo-binstall- Install Cargo Make
https://github.com/sagiegurari/cargo-make
$ cargo binstall -y cargo-make- Initialize the project
$ makers setup$ makers dev$ makers testEffectful formatting and linting was merged into one task:
$ makers formatYou can run makers lint just to spit out errors and warnings.
$ makers lintDockerfile compiles the project to MUSL for a minimal image.
You can build it with:
$ docker buildx build -f ./Dockerfile .But the easies way is with Docker Compose.
$ docker compose up --buildAdditionally, there's a GitHub Action that builds and pushes the image to GitHub Container Registry on every push to main after you uncomment the on trigger.
The testing GitHub Action runs on every push to main and pull_request and formats, tests and builds the project in that order.