A github rust workflows template, just want to focus on coding

Overview

rust-template

GitHub workflow status License

A github rust workflows template, just want to focus on coding.

Table of contents

Features

  • Fast generate template with GitHub Actions and caching
  • Support cargo-generate
  • ??Directly create your Github repository??

Template

  • Based on conventional commits
  • Based on push vTag
  • Bumps Crate version
  • Create GitHub tags
  • Generate CHANGELOG
  • Continuous integration with caching
  • Cross-platform static compilation
  • Upload artifact
  • Publish to Crates
  • Publish to Docker hub
  • Publish to Github releases
  • contrib.rocks
  • starcharts

Usage

Use GitHub actions

This will not affect your Github, give it a try:

  1. Use this template.
  2. Under your repository name, click Actions.
  3. In the left sidebar, click the Generate.
  4. Above the list of workflow runs, click the Run workflow button.
  5. When all work is done, at the bottom of the workflow summary page, download template artifacts.
  6. Enjoy!

When running for the first time, the cache needs to be created. Next time, soon.

Use cargo-generate

See more.

# bin
cargo generate --git https://github.com/uplau/rust-template ./template --name "crate-name" --bin

# lib
cargo generate --git https://github.com/uplau/rust-template ./template --name "crate-name" --lib

Template options

Field Type Default Description
crate-name string required Package name
crate-type bin or lib bin Linkage
gh-username string required GitHub username (or organization), for filling LICENSE
copyright-year string 2023 Copyright year, for filling LICENSE
use-badge bool true Insert status badge to README top
use-contrib-rocks bool false Insert contrib.rocks to README#Contributors
use-deps bool true Insert commonly use deps to Cargo.toml
use-rust-template bool true Insert rust-template to README#Contributing

Template workflows

This document is not exhaustive, see

The workflows of bin can be view summary here, view file here.

The workflows of lib can be view summary here, view file here.

jobs.release_please only_bin

We use Release Please parses your git history, looking for conventional commits, and creating release PRs to:

What's a Release PR?

You need allow GitHub Actions to create and approve pull requests, setting can be managed by admins in organization settings under Actions > General > Workflow permissions.

  • Bumps Crate version
  • Create GitHub tags
  • Generate CHANGELOG

jobs.ci

We run the following command to complete continuous integration:

  • cargo test
  • cargo fmt
  • cargo clippy

jobs.build only_bin

When ci is passed, we build under the following targets:

static_link 64bit

  • macOS
  • Linux
  • Windows

jobs.*_release only_bin

When the build passes, we upload the artifacts and publish to Github releases, which you can download at any time at the bottom of the workflow summary page:

  • manually_release: Triggered by workflow_dispatch
  • automatic_release: Triggered by release_please

Contributors

License

rust-template is licensed under either of the following, at your option:

You might also like...
This is a template to build secret contracts in Rust to run in Secret Network

Secret Contracts Starter Pack This is a template to build secret contracts in Rust to run in Secret Network. To understand the framework better, pleas

A template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it.

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

๐Ÿ–จ Template for Rust applications & smart contracts @okp4.

Rust Template Template for Rust projects @okp4. Purpose & Philosophy This repository holds the template for building Rust projects with a consistent s

Minimal compile-time Rust template engine

boilerplate boilerplate is a minimal compile-time Rust text template engine. Quick Start Add boilerplate to your project's Cargo.toml: [dependencies]

A template for your next Rust project.

Opinionated Rust Template A template for your next Rust project. To start coding run: cargo generate tomkarw/opinionated-rust-template Only requires j

Cloup is a template manager that provides the files you desire when you need them, written in Rust.
Cloup is a template manager that provides the files you desire when you need them, written in Rust.

cloup cloup is a template manager that delivers the files you desire when you need them, written in rust you no longer need to locate your previous pr

A template for command-line Rust programs

This is a template for command-line Rust programs. Clone and run the rename script with both a lowercase and UpperCase name. In the dev profile, depen

Rust-Rocket framework template Demo

rocketapp Rust-Rocket framework template Demo dependencies are defined in Cargo.toml Clone as: git clone https://github.com/srikantgdev/rocketapp [op

Rust Cannon Template ๐Ÿฆ€ ๐Ÿ’ฃ ๐Ÿ’ฅ

A build system and a minimal Rust program for building MIPS binaries that are executable in the context of [Optimism Cannon]

Aya is an eBPF library for the Rust programming language, built with a focus on developer experience and operability.

Aya API docs | Chat | Aya-Related Projects Overview eBPF is a technology that allows running user-supplied programs inside the Linux kernel. For more

null 1.5k Jan 6, 2023
Rustycan - UI framework for Rust with focus on developer ergonomics for retained or immediate-like mode

Rustycan is a powerful UI framework for Rust, designed to make it easier than ever to create UIs and update existing UIs for games or apps.

Nokola 3 Jan 3, 2023
A simple MD5 implementation with a focus on buffered reading

md5-rs A simple MD5 implementation with a focus on buffered reading, and is completely no_std. This shouldn't be used in any security-critical softwar

Magnetar 3 Mar 25, 2022
A library to help you sew up your Ethereum project with Rust and just like develop in a common backend

SewUp Secondstate EWasm Utility Program, a library helps you sew up your Ethereum project with Rust and just like development in a common backend. The

Second State 48 Dec 18, 2022
use your GitHub SSH keys to authenticate to sshd

aeneid If you squint, GitHub is basically a free, zero-ops IdP that provides SSH public keys. Let's use it to authenticate to OpenSSH! What / How? The

Nikhil Jha 21 Dec 6, 2022
Retrieving SSH and GPS keys from GitHub and GitLab

Dormarch Retrieving SSH and GPS keys from GitHub and GitLab Usage After having installed Dormarch, you can see all the options with dormarch -h. To re

Riccardo Padovani 2 Dec 24, 2021
Authorize an ssh session using your keys on GitHub.

GitHub AuthorizedKeysCommand (hubakc) Heavily inspired by https://github.com/sequencer/gitakc . It allows someone login to the server using their ssh

Wenzhuo Liu 5 Nov 11, 2022
Provision your authorized_keys via HTTPS/GitHub/GitLab

Keyps Key Provisioning Service Provision authorized_keys from HTTPS/GitHub/GitLab and automatically keep them up to date. Motivation Problem Provision

Samuel Rounce 6 Apr 27, 2023
Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana (WIP) โ›๐Ÿ‘ท๐Ÿšงโš ๏ธ

Solana BPF Boilerplate Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana This boilerplate provides the following. Si

ono 6 Jan 30, 2022
A blazing fast, type-safe template engine for Rust.

markup.rs A blazing fast, type-safe template engine for Rust. markup.rs is a template engine for Rust powered by procedural macros which parses the te

Utkarsh Kukreti 209 Dec 24, 2022