Skip to content

learn-rust-projects/template

Repository files navigation

{{project-name}}

This project is inspired by https://github.com/tyr-rust-bootcamp/template

Environment Setup

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Recommended VSCode Extensions

  • Dependi: Rust package management extension
  • CodeLLDB: Rust debugger
  • Even Better TOML: TOML file support
  • Better Comments: Enhanced comment display
  • Error Lens: Improved error highlighting
  • GitLens: Git enhancement
  • indent-rainbow: Indentation visualization
  • Prettier - Code formatter: Code formatting
  • REST client: REST API debugging
  • rust-analyzer: Rust language support
  • Test Explorer UI: Rust test overview
  • TODO Highlight: TODO highlighting
  • Todo Tree: TODO list management
  • vscode-icons: Icon optimization
  • YAML: YAML file support
  • Code Case Converter: Code case conversion
  • markdownlint: Markdown syntax checking

Install pre-commit

pre-commit is a code quality tool that runs checks before committing code.

pipx install pre-commit

After installation, run pre-commit install to set up git hooks.

Install Cargo deny

Cargo deny is a Cargo plugin for dependency security auditing.

cargo install --locked cargo-deny

Install typos

typos is a spelling checker for code and documentation.

cargo install typos-cli

Install git cliff

git cliff is a tool for generating changelogs from git history.

cargo install git-cliff

Install cargo nextest

cargo nextest is an enhanced test runner for Rust projects.

cargo install cargo-nextest --locked

Install cargo generate

cargo generate is a project template generator that can create new projects from existing GitHub repositories.

cargo install cargo-generate

Usage

  • After installing cargo generate, create a new project using this template:
cargo generate --git https://github.com/learn-rust-projects/template
  • In the generated project, run pre-commit install to set up git hooks.
  • Modify the name field in Cargo.toml to your project name and update the license if needed.
  • Update the content in README.md with your project information.
  • Update the repository URL in cliff.toml to match your project's repository.
  • Make your first commit:
  git add .
  git commit -a
  # Wait for pre-commit hooks to complete
  git push
  • generate the changelog:
  git-cliff -o CHANGELOG.md
  • tag the release:
  git tag -a v0.1.0 -m "chore: Release wx-uploader version 0.5.1"
  git push --tags

License

This project is licensed under the terms of the MIT license.

About

project template

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •