https://github.com/federicostra/rust-templates
A collection of templates to be used with `cargo generate`.
https://github.com/federicostra/rust-templates
cargo cargo-generate rust template-repository templates
Last synced: 8 months ago
JSON representation
A collection of templates to be used with `cargo generate`.
- Host: GitHub
- URL: https://github.com/federicostra/rust-templates
- Owner: FedericoStra
- License: mit
- Created: 2022-09-15T10:34:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T10:55:26.000Z (about 2 years ago)
- Last Synced: 2025-01-24T01:51:06.326Z (over 1 year ago)
- Topics: cargo, cargo-generate, rust, template-repository, templates
- Language: Rust
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-templates
> A collection of templates to be used with `cargo generate`.
[](https://github.com/FedericoStra/rust-templates)
[](https://github.com/FedericoStra/rust-templates/actions/workflows/build.yml)
[](https://github.com/FedericoStra/rust-templates/blob/master/LICENSE)
These templates are supposed to be used with `cargo generate`:
- crate:
- guide:
## Templates
### lib
Generate a basic library. Features:
- `Cargo.toml` with name, author, description, license, repository;
- `README.md` with description and badges (crates.io, docs.rs, repository, workflow, dependencies, license);
- `CHANGELOG.md` automatically updated by `cargo release`;
- `release.toml` to configure `cargo release`;
- enable all features on `docs.rs` (and document the features required for every item);
- GitHub workflow to check the library.
#### placeholders
- `gh_username`: GitHub username. The repository will be `{{gh_username}}/{{project-name}}`.
- `description`: description of the project.
### bin
Generate a basic binary. Features:
- `Cargo.toml` with name, author, description, license, repository;
- `README.md` with description and badges (crates.io, docs.rs, repository, workflow, dependencies, license);
- `CHANGELOG.md` automatically updated by `cargo release`;
- `release.toml` to configure `cargo release`;
- enable all features on `docs.rs` (and document the features required for every item);
- GitHub workflow to check the library and test the binary.
#### placeholders
- `gh_username`: GitHub username. The repository will be `{{gh_username}}/{{project-name}}`.
- `description`: description of the project.
## Release guide
This section is mainly intended for personal use, as a reminder to myself of the process of releasing a new version.
- Make sure `CHANGELOG.md` is up to date:
+ add under `## [Unreleased]` the relevant subsections among `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`
+ change `## [Unreleased]` to `## [{{version}}] - {{date}}`
+ update links at the end:
* `[Unreleased]: https://github.com/FedericoStra/rust-templates/compare/{{version}}...HEAD`
* `[{{version}}]: https://github.com/FedericoStra/rust-templates/compare/{{previous_version}}...{{version}}`
- Tag the new version (remember to sign): `git tag -s v{{version}}`
- Push: `git push && git push --tags`