No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bradlee Speice ad5274f2ac Minor makefile update 10 months ago
hooks Don't run initial commit 10 months ago
{{ cookiecutter.crate_name }} Minor makefile update 10 months ago
.gitignore Add some final cleanup 10 months ago
LICENSE Add some final cleanup 10 months ago Fix sed stripping too much whitespace 10 months ago
cookiecutter.json Updates for `crate_name` 10 months ago

Rust CI

A template for generating Rust projects that make use of some common continuous-integration services

Sets up a Rust crate to make use of some freely-available testing tools, with the option of adding extra automation if so desired. Features:

  • Travis CI/AppVeyor: Automated crate testing on Linux, MacOS and Windows
  • rustfmt: Builds fail if code is out of style
  • Codecov: (Optional) Code coverage statistics for test cases
  • Bors NG: (Optional) “Strict mode” pull request management
  • (Optional) Automatically publish to by pushing a git tag
  • cross: (Optional) Test on more than just x86/_64 architectures


It’s easy to start new projects, and migrate existing projects to the new infrastructure. But if you already have a CI workflow you like - keep it.

New Projects

To set up your own crate making use of this template, do the following:

pip install --user cookiecutter
cookiecutter gh:bspeice/rust-ci

A series of prompts will walk you through the remaining options:


Used in locations like Cargo.toml to identify the author


Used in locations like Cargo.toml to identify the author


The username Github refers to you by; needed for links throughout the template


The name of the crate you are authoring. This is assumed to be the same name as the Git repository.


Whether to generate a library or binary project, similar to cargo init --lib and cargo init --bin.


Yes/no whether to use the Bors bot for automating merging of pull requests. For instructions on using Bors, please see


Yes/no whether to record code coverage statistics at Codecov.


By default, Travis/Appveyor can only build on x86/_64 hosts for Linux, Mac OSX, and Windows. If this option is selected, the rust-embedded/cross will be used for testing on a much wider range of architectures.


Options for the default LICENSE file


Token for publishing to using an automated build. Tokens are encrypted before commit so there are no worries about publishing sensitive information.

If you choose not to publish to in an automated fashion, please leave this field blank.

When the token is specified, a new version of the crate can be published to by pushing a git tag of the format vX.Y.Z where X, Y, and Z are the major, minor, and patch numbers respectively.

Two important things to keep in mind:

1. There are no checks for the git tag and Cargo.toml containing the same version number
2. [Workspace]( and multi-crate setups
will need more hands-on work than this template can provide. Please see
[Travis' custom deployment](
page to learn more about automated deploys for these scenarios.

Migrating existing projects

This template is designed to make migrations from trust and projects without CI very easy. Workspace projects are difficult to migrate, but individual crates should be simple.

To migrate:

  1. Initialize a new project folder as outlined above. When prompted for the project_type, please use the same type as the code being migrated.
  2. rm new_project/.git -r and cp old_project/.git new_project/.git -r to make sure no history is lost
  3. Copy your original project files over; this includes things like:
    • src
    • testing
    • examples
    • Cargo.toml
    • etc.
  4. Add the new files in Git and commit to preserve the changes - git add . && git commit


Most of the services run automatically. That said, there are some important notes for where humans are still needed to maintain the project:

  • If using bors, please take note of their documentation to understand the desired workflow
  • If you added a API key, all that is needed to publish a new release is pushing a git tag. Travis will automatically build and deploy tags of the form vX.Y.Z.
  • There is a Makefile included to help with generation of the and files. Please run make doc prior to release to update this documentation