Rust Template repository
Description • Install • Usage • Use this template • Contribute
rustere
stands for Rust template repository.
It's just a template repository for Rust, with the following features :
Install rustere
by running :
cargo install rustere
rustere
does not contain any useful code because it's a template repository.
But you can run the following command to check if the package was correctly installed :
console
rustere
To use this template, click the button "Use this template" :
It will prompt you to create a new Github repository.
Then replace the content in your freshly created repository, with your own package name, own code, and update the links to point to your own repository.
Here is an exhaustive list of things to do :
cargo.toml
: Replace the name of the package, the version, the author, the description, and the homepage.README.md
: You can keep the same README outline, but you must update the core content to fit what you're building. Make sure to replace any occurence of astariul
with your own username, and replace any occurence of rustere
with the name of your package.src/main.rs
and src/lib.rs
and put your own code.tests/integration_tests.rs
with actual tests..github/
folder :.github/ISSUE_TEMPLATE/bug.yaml
, replace rustere
with the name of your package..github/ISSUE_TEMPLATE/config.yml
, replace astariul/rustere
by your own <user>/<repo>
.crates.io
), you can remove it !Settings
tab of your repository, then in the Security & analysis
section you can enable Dependabot alerts
and Dependabot security updates
.crates.io
API token : The Github action that automatically publish your package to crates.io
requires your API token. You can store this API token in a Github secret. Settings
tab of your Github repository, then go to the Secrets
section, and click the button New repository secret
. CARGO_REGISTRY_TOKEN
, and paste your API token in the value field.To contribute, install the package locally, create your own branch, add your code (and tests, and documentation), and open a PR !
Ensure the code you added is properly formatted with :
console
cargo fmt
When you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary !
You can run the tests with :
console
cargo test
The documentation should be kept up-to-date. You can visualize the documentation locally by running :
console
cargo doc --open