A repository template to get started with writing Rust projects.
- CI/CD support with GitHub Actions
- Deploy Rustdoc documentation to GitHub Pages
- Run tests with LLVM code coverage
- Rustfmt and Clippy for formatting and linting
- cargo-audit for security auditing (by the Secure Code WG)
- Trusted Publishing with OIDC (OpenID Connect)
- Includes MIT & Apache-2.0 licenses for ecosystem compatibility (see Rust API Guidelines book)
Choose a method:
- GitHub UI: Press the "Use this template" button in the top-right corner of this page.
- GitHub CLI: Install GitHub CLI. Then run one of the following:
gh repo create --template neoncitylights/rust --public --clone {{repository}} # clone as public gh repo create --template neoncitylights/rust --private --clone {{repository}} # clone as private
Replace the following placeholders with your editor's find-and-replace:
{{library}}- The name of the library.{{desc}}- The description of the library.{{author}}- The author's name of the library. For example, this could be a username, nickname, or real name.{{email}}- The author's email address. This is optional and can be deleted.neoncitylights/rust- Replace this with the name of your repository.my_crate- Replace this with the name of your crate.
| Tool | File path | Reference |
|---|---|---|
| GitHub Actions CI | .github/workflows |
Reference |
| Cargo package | Cargo.toml |
Reference |
| Clippy (Linter) | .clippy.toml |
Repository, Reference |
| Rustfmt (Formatter) | .rustfmt.toml |
Repository, Reference |
| Script | Command |
|---|---|
| Run tests | cargo test |
| Run Rustfmt | cargo fmt |
| Run Clippy | cargo clippy |
| Build crate documentation | cargo doc |
| Run security audits | cargo audit (with cargo-audit) |