This is a template for Rust project. Use it as a starting point to quickly set up your own project with a standardized structure, build process, and development workflow.
To begin:
- Change
project_name
in Cargo.toml, Makefile, .dockerignore, and .gitignore - Configure repository files in .github/ directory
- Update Cargo.toml
- Optionally remove
Cargo.lock
frommake distclean
, .dockerignore, and .gitignore if you want to lock particular dependencies versions - Update LICENSE and all mentions of it (
grep LICENSE
) - Update contact information and email addresses (
grep @example.com
) - Edit this README and replace all
<...>
placeholders - Start your project
Note: Project name must only contain ASCII lowercase letters, digits, periods, and hyphens. It must start with a letter, must not end with a period nor hyphen, and must not contain two adjacent periods nor hyphens.
Regex: [a-z]([-.]?[0-9a-z]+)*
Rationale: This is the most portable naming convention that is also human and machine friendly.
- It is compatible with most character sets and encodings: ASCII, Unicode, UTF-8, base64-url
- It is case-insensitive
- It can be used as a filename on most filesystems It is compatible with POSIX portable filename character set
- It is URL-safe
- It is compatible with docker image naming convention
- It is compatible with make, shell, markdown, and other programming and markup languages. No spaces, or any special characters which could be problematic to handle
- It can be used as an identifier in programming languages. May only require changing a hyphen ('-') to an underscore ('_')
Download pre-compiled binary package. See changelog for details.
-
Install build dependencies (these can be removed after build)
- make
- rust + cargo (>= 1.56)
-
Download and extract source code
# packages available also in .tar.zst and .zip formats curl -LO https://<URL>/<PKGNAME>/download/<PKGNAME>.src.tar.gz tar -xzf <PKGNAME>.src.tar.gz
-
Build and install
cd <PKGNAME> make CARGO_FLAGS=-r make install
docker pull <REGISTRY>/<PKGNAME>
docker run -it --rm <REGISTRY>/<PKGNAME>
Basic configuration. Usage examples.
See documentation for details.
Why use this software? Comparison with other similar projects.
How does it work?
-
Install required dependencies
- rust + cargo (>= 1.56)
- git
-
Install optional dependencies
- sh: Run make scripts
- make: Build using make, which wraps cargo commands and adds more
- docker: Build docker image
-
Clone repository
git clone --recurse-submodules https://<URL>/<PKGNAME>.git
-
Build and run project
cargo run
See documentation for details.
Before asking a question, check out documentation and issues labeled "question".
Cannot find answer you are looking for? Submit an issue or write an email to questions@example.com.
Found a security vulnerability? Read security policy.
Found a bug? Missing a feature? Want to help? Read contribution guidelines.
This project is licensed under the MIT license.