Skip to content
/ rust-template Public template

Rust starter template from ZK engineering team 🚀

License

Notifications You must be signed in to change notification settings

NethermindEth/rust-template

🦀 RUST PROJECT TEMPLATE - TODO(template) PUT PROJECT NAME HERE

Docs Lint Build Dependencies UB Coverage

Rust

License

Crates.io Documentation

TODO(template) describe the project

TODO(template) - rust template usage (remove this section after setup)

This is a rust template from ZKE team 🚀 (a focus on cryptographic libs in sync Rust).

🚲 To use it - find TODO(template) over the repository and set appropriate values.

  • Settings -> Collaborators and teams - add your team group as admins for the repo (e.g. zk-engineering)
  • Settings -> General -> Pull Requests - allow only Allow squash merging, also tick Automatically delete head branches
  • Settings -> Pages -> Build and deployment -> Source Github Actions
  • Update the description of the repo at the repo's page, add tag topics
  • Introduce necessary sections at the repo's page (releases, deployments etc)
  • Add a website url (if applicable) or a docs page (see docs flow for public repos)
  • Add all contributors
  • Import protection rulesets (see below) in the repo settings (Settings -> Rules -> Rulesets -> Import a ruleset)
  • For binary crates with specific requirements to Rust features consider also pinning the rust toolchain version

Main branch protection

{
  "id": 4981961,
  "name": "Main protection",
  "target": "branch",
  "source_type": "Repository",
  "source": "NethermindEth/rust-template",
  "enforcement": "active",
  "conditions": {
    "ref_name": {
      "exclude": [],
      "include": [
        "~DEFAULT_BRANCH"
      ]
    }
  },
  "rules": [
    {
      "type": "deletion"
    },
    {
      "type": "non_fast_forward"
    },
    {
      "type": "required_deployments",
      "parameters": {
        "required_deployment_environments": []
      }
    },
    {
      "type": "required_signatures"
    },
    {
      "type": "pull_request",
      "parameters": {
        "required_approving_review_count": 1,
        "dismiss_stale_reviews_on_push": false,
        "require_code_owner_review": false,
        "require_last_push_approval": false,
        "required_review_thread_resolution": true,
        "automatic_copilot_code_review_enabled": false,
        "allowed_merge_methods": [
          "merge",
          "squash",
          "rebase"
        ]
      }
    }
  ],
  "bypass_actors": []
}

Signed commits

{
  "id": 4982030,
  "name": "Signed commits",
  "target": "branch",
  "source_type": "Repository",
  "source": "NethermindEth/rust-template",
  "enforcement": "active",
  "conditions": {
    "ref_name": {
      "exclude": [],
      "include": [
        "~ALL"
      ]
    }
  },
  "rules": [
    {
      "type": "required_signatures"
    }
  ],
  "bypass_actors": []
}

How to use

Either with "Use this template" green button on Github or, in case of using another git hosting service (or have to avoid referencing this repository), you can use cargo-generate.

cargo install cargo-generate

cargo generate --git https://github.com/NethermindEth/rust-template

Examples

See examples.

AI tools disclosure - TODO(template)

The content published here may have been refined/augmented by the use of large language models (LLM), computer programs designed to comprehend and generate human language. However, any output refined/generated with the assistance of such programs has been reviewed, edited and revised by [TODO(template) company name].

License

TODO(template) - update license if needed. For commercial licenses it is required to get an approve from Legal.

Apache 2.0

Would like to contribute?

see Contributing.

About

Rust starter template from ZK engineering team 🚀

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors 13