https://github.com/richardsondev/rustapplicationtemplate
A project template to build a Rust application in GitHub Actions and publish release artifacts automatically for Windows, Linux, and macOS
https://github.com/richardsondev/rustapplicationtemplate
docker github-actions rust rust-template template-project template-repository workflow
Last synced: 3 months ago
JSON representation
A project template to build a Rust application in GitHub Actions and publish release artifacts automatically for Windows, Linux, and macOS
- Host: GitHub
- URL: https://github.com/richardsondev/rustapplicationtemplate
- Owner: richardsondev
- License: mit
- Created: 2023-06-22T10:07:19.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-10-06T06:27:25.000Z (3 months ago)
- Last Synced: 2025-10-06T07:11:13.347Z (3 months ago)
- Topics: docker, github-actions, rust, rust-template, template-project, template-repository, workflow
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Application Template
This is a template project to build a Rust application using GitHub Actions and automatically publish release artifacts for Windows, Linux, and macOS.
## How to Use
1. **Create a new repository from this template.**
On GitHub, click the "Use this template" button to create a new repository based on this template.
2. **Clone your new repository.**
Clone your newly created repository to your local machine and navigate to the root directory of the project.
3. **Run the project locally.**
You can run the project locally by using the following command in your terminal:
```bash
cargo run
```
This command will compile your code and run the resulting executable.
4. **Commit and push changes.**
After making changes, commit and push to your repository. GitHub Actions will automatically start the build process.
## GitHub Actions
This project uses GitHub Actions for continuous integration. Upon each push to your repository or release creation, the workflow will:
- Check out the latest code.
- Set up the necessary Rust environment.
- Build and test the project.
- Create release artifacts for Windows, Linux, and macOS. (Only on release creation events)
The artifacts will then be available for download from the "Actions" tab on your repository and also from the "Releases" tab for release events.
## Docker image
This project also contains `buildpush.sh` which will build a distroless Docker image with the application as the entry point. By default, the
script will push the built multi-arch images to DockerHub. [Here](https://hub.docker.com/r/richardsondev/hello_world/tags) is an example of
what it would look like.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the [MIT License](LICENSE).