https://github.com/imbolc/crate-template
A template for a library crate
https://github.com/imbolc/crate-template
cargo-generate
Last synced: 7 months ago
JSON representation
A template for a library crate
- Host: GitHub
- URL: https://github.com/imbolc/crate-template
- Owner: imbolc
- Created: 2021-12-28T17:58:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-24T05:44:34.000Z (over 1 year ago)
- Last Synced: 2025-02-24T06:23:56.368Z (over 1 year ago)
- Topics: cargo-generate
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crate template
A [cargo-generate][] template for a library crate including:
- github actions and pre-commit lints
- crate badges
- MIT license
## Configured lints
- Clippy warnings
- Tests
- Nightly `rustfmt` with wrapped comments and grouped imports
- Unused Cargo dependencies with [cargo-shear][]
- [Typos][typos]
- `Cargo.toml` sorting with [cargo-sort][]
## Usage
```bash
cargo install cargo-generate
read -p "Enter the crate name: " crate
cargo generate --git https://github.com/imbolc/crate-template.git --name $crate
cd ./$crate && ./.pre-commit.sh
git add . && git commit -m'Init'
```
[cargo-generate]: https://github.com/cargo-generate/cargo-generate
[cargo-shear]: https://github.com/Boshen/cargo-shear
[cargo-sort]: https://github.com/DevinR528/cargo-sort
[typos]: https://github.com/crate-ci/typos