managing-cargo-dependencies

Installation
SKILL.md

Cargo Dependencies Management

Guidance for adding and managing dependencies in Cargo.toml files within the HASH repository's workspace structure.

Core Principles

HASH uses a strict workspace dependency pattern:

DO:

  • Add external dependencies to workspace root [workspace.dependencies]
  • Use caret version specifiers (e.g., version = "1.0.0" = ^1.0.0)
  • Set default-features = false for all dependencies unless specifically needed
  • Use workspace = true in package Cargo.toml
  • Organize dependencies into 4 sections with comment headers
  • Use public = true for dependencies exposed in public API
  • Align dependency names using spaces for readability

DON'T:

Related skills

More from hashintel/hash

Installs
1
Repository
hashintel/hash
GitHub Stars
1.6K
First Seen
1 day ago