Skip to content
/ rust-template Public template

Repository template to get quickly started with Rust projects 🦀

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

nlp-rs/rust-template

Repository files navigation

Rust Repository Template 🦀

License CI Security audit codecov

Repository template to get quickly started with writing Rust libraries, ready for distributing.

Getting started

Open your favorite terminal and clone this locally.

  • With the GitHub CLI (replace <project> with what you'd like to call your project):
    gh repo create <project> --template nlp-rs/rust-template
  • With the Git CLI:
    git clone https://github.com/nlp-rs/rust-template.git

Features

  • Remote development support with GitHub Codespaces
  • Debugging with the LLDB Debugger tool in Visual Studio Code (VSCode Marketplace)
  • Fuzz testing with LLVM's libFuzzer tool and cargo fuzz (Reference)
  • Performance benchmarks in Rust with Criterion and Iai (suitable to run in GitHub Actions CI environments)
  • CI/CD support with GitHub Actions, allowing to automate:
    • Running tests and benchmarks
    • Running Rustfmt and Clippy for detecting formatting and linting errors, respectively
    • Daily, midnight scheduled audits of Rust packages (for outdated dependencies, compatible software licenses, and software vulnerabilities) with EmbarkStudios/cargo-deny-action
    • Generating performance benchmark graphs, auto-publishing to GitHub Pages
    • Documentation of API docs and mdBook using GitHub Pages
    • Linted commit messages with Conventional Commits
    • Semantic version bumping, CHANGELOG.md updates, and new package releases

Configure

Tool File path Reference
GitHub Codespaces devcontainer.json Reference
GitHub Actions .github/workflows Reference
Cargo package Cargo.toml Reference
Clippy (Rust linter) .clippy.toml Repository, Reference
Rustfmt (Rust formatter) .rustfmt.toml Repository, Reference
Commitlint .commitlintrc.json Repository, Reference
cargo-deny deny.toml Repository

Run scripts locally

  • Run unit/integration/doc tests: cargo test
  • Run fuzz tests: cargo fuzz <fuzz-target>
  • Run Rustfmt: cargo fmt
  • Run Clippy: cargo clippy
  • Run performance benchmarks: cargo bench
  • Generate API docs for crate: cargo doc
  • Generate mdBook docs for crate: mdbook build
  • Run security audits: cargo audit (requires installing cargo-audit locally)
  • Lint commit messages: npm run lint:commit (requires installing commitlint locally with npm install)

{{library}}

{{library description}}

Install

cargo add {{library}}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Repository template to get quickly started with Rust projects 🦀

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks