repository template for Rust projects
Rust 3.8%
Other 96.2%
59 1 0

Clone this repository

https://tangled.org/samanthanguyen.me/rust
git@tangled.org:samanthanguyen.me/rust

For self-hosted knots, clone URLs may differ based on your setup.

README.md

Rust template#

A repository template to get started with writing Rust projects.

Features#

Getting started#

Creating a new repository#

  1. Clone this repository template
  2. In the repository directory, remove .git folder with rm -rf .git
  3. In the repository directory, Initialize git repository with git init .

Replace placeholders#

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.
  • my_crate - Replace this with the name of your crate.

Configure#

Tool File path Reference
Tangled CI .tangled/workflows Reference
Cargo package Cargo.toml Reference
Clippy (Linter) .clippy.toml Repository, Reference
Rustfmt (Formatter) .rustfmt.toml Repository, Reference

Run scripts locally#

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)