Crates.io | new-rust-project |
lib.rs | new-rust-project |
version | 0.1.4 |
source | src |
created_at | 2019-06-14 23:45:49.364652 |
updated_at | 2019-06-20 20:21:57.436281 |
description | @ErichDonGubler's fancy template for new Rust projects |
homepage | |
repository | https://github.com/erichdongubler/new-rust-project |
max_upload_size | |
id | 141251 |
size | 35,253 |
This project is Erich's personal Rust starter kit for developing new libraries and binaries in
Rust. You shouldn't be seeing this anywhere outside of his
new-rust-project
repo.
At one point, Erich got tired of accumulating lots of interesting tidbits for starting Rust projects that he knew he'd forget. So he finally hunkered down and made this repo. An example of usage:
#! /bin/sh
git clone --shallow https://github.com/ErichDonGubler/new-rust-project name-of-new-rust-project
cd name-of-new-rust-project
rm -rf .git
git init
git add .
git commit -m "Initial commit"
git remote add origin git@github.com:ErichDonGubler/name-of-new-rust-project
git push -u origin master
This template uses MPL 2.0 by default. Erich's reasons for MPL by default here are:
When in doubt, remember that Erich is not a lawyer. change your own project to use what you deem appropriate.
Contributions, feature requests, and bug reports are warmly welcomed! See the contribution guidelines for getting started.
The code of conduct uses Contributor Covenant v1.4.1. If there's a newer version of this, feel free to open a PR!
Crate documentation is inlined into this README. This means you get doc-tests for freebies!
Try it out by reading the README -- it uses cargo-sync-readme
. Also, this is integrated into
CI, so you don't forget about it!
println!("This should run just fine.");
panic!("This should panic.");
!@#$% // This should fail to compile.
The Rust Playground is used as the playground service by default.
cargo-release
configurationcargo-release
is configured to keep features of this template in sync with version releases,
and has some defaults Erich considers more sensible.
Yes, you should maintain a CHANGELOG
. ;)
Several rustc
and clippy
lints have been enabled that Erich prefers. See the top of
src/lib.rs
for the full list.
Warnings are denied in doctests and in release mode.
The associated CI configuration (Travis at .travis.yml
) tests:
cargo clippy
cargo fmt
cargo test
There are a variety of handy buttons on the top of the README. These are meant to encourage
activity both for maintainers and newcomers. Some buttons may not be suitable for, say,
internal or private projects that won't actually be published on crates.io
. You are
encouraged to keep the ones you want and throw out the rest.