skill-rust-workspace

skill-rust-workspace is a cursor rule for Cursor from dewtech-technologies/dare-method. It costs 0 tokens per session (3,129 once invoked), scanned A, original, MIT.

A decision guide for choosing between one Rust package and a Cargo workspace containing multiple packages as a project grows.

In plain words
What is it for?
It helps plan Rust/Axum project layouts and migrate a growing single-package project into separate crates when needed.
Why use it?
It helps avoid both unnecessary structure in small projects and architectural strain in larger ones.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/dewtech-technologies/dare-method/skill-rust-workspace
Clone the repo
git clone --depth 1 https://github.com/dewtech-technologies/dare-method

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for skill-rust-workspace

README.md
[![agentmods](https://agentmods.dev/badge/rules/dewtech-technologies/dare-method/skill-rust-workspace.svg)](https://agentmods.dev/rules/dewtech-technologies/dare-method/skill-rust-workspace)
Your own site
<a href="https://agentmods.dev/rules/dewtech-technologies/dare-method/skill-rust-workspace"><img src="https://agentmods.dev/badge/rules/dewtech-technologies/dare-method/skill-rust-workspace.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,129 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03129
Opus 5 $0.00000 $0.01564
Sonnet 5 $0.00000 $0.00626
Haiku 4.5 $0.00000 $0.00313

Measured today against content hash 07a129cae574, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

skill-rust-workspace scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

implementations/cursor/.cursor/rules/skill-rust-workspace.mdc · 313 lines

How it starts

The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Rust workspace — single-crate vs multi-crate

Esta skill cobre dois cenários relacionados:

  • Cenário A — você está gerando DESIGN.md/BLUEPRINT.md de um projeto Rust/Axum e precisa decidir desde já se ele nasce single-crate ou em workspace.
  • Cenário B — o projeto Rust já existe em single-crate e cresceu ao ponto de doer (compilação lenta, fronteiras arquiteturais erodindo, workers acoplados ao API server). Você precisa propor um plano de migração para workspace.

A regra geral: comece simples, migre quando os critérios objetivos abaixo aparecerem. Workspace é a estrutura idiomática Rust para projetos maduros, mas é overengineering para o "hello world".


Cenário A — Decisão na fase Design/Blueprint

Antes de escrever o BLUEPRINT da stack rust-axum, decida: single-crate ou workspace? Os critérios são objetivos:

Comece single-crate quando TODOS forem verdadeiros

  • Apenas 1 binário (HTTP server).
  • Estimativa de < 30 arquivos .rs no src/.
  • 1–2 sistemas externos (apenas DB; ou DB + cache).
  • Equipe ≤ 2 devs trabalhando ativamente.
  • Nenhum requisito de deploy independente para subcomponentes.

Comece workspace multi-crate quando QUALQUER um for verdadeiro

  • ≥ 2 binários previstos (API + worker; API + admin; API + CLI).
  • Múltiplos sistemas externos (3+: PG + Redis + Rabbit + Qdrant + Neo4j + …).
  • Deploy independente desejado (workers em pods separados no k8s, scaling independente).
  • Fronteiras arquiteturais críticas (domain puro sem HTTP/DB; SDK que vai virar crate público; biblioteca de cliente compartilhada com outras apps).
  • Equipe ≥ 3 devs trabalhando em módulos diferentes em paralelo.

Layout convencional para workspace

Use o prefixo do projeto (<p>) como namespace de todos os crates — por exemplo wa- para uma wa-business-api, agent- para um agent-ai, chat- para um chat-service.

projeto/
├── Cargo.toml                          # workspace root, deps centralizadas
├── docker-compose.yml
├── Dockerfile
├── crates/
│   ├── <p>-domain/         (lib)       # entities puras: structs, errors, types
│   ├── <p>-config/         (lib)       # AppConfig::from_env()
│   ├── <p>-db/             (lib)       # sqlx pool, migrations
│   ├── <p>-cache/          (lib)       # redis/moka (se houver)
│   ├── <p>-queue/          (lib)       # lapin/kafka (se houver)
│   ├── <p>-crypto/         (lib)       # bcrypt, jwt, aes (se aplicável)
│   ├── <p>-meta-client/    (lib)       # cliente externo (Meta API, Stripe…)
│   ├── <p>-services/       (lib)       # business logic, sem HTTP
│   ├── <p>-api/            (bin + lib) # HTTP server (handlers, router, mw)
│   ├── <p>-worker-<X>/     (bin)       # 1 binário por tipo de worker
│   ├── <p>-admin/          (bin)       # CLI admin (se houver)
│   └── <p>-e2e/            (tests)     # integration tests cross-crate
└── xtask/                              # scripts de build/dev em Rust

Read the full file on GitHub · 313 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 313 lines · 0 tokens per session scan A 07a129cae574

Subscribe to this mod's changes

skill-rust-workspace is a cursor rule published in the GitHub repository dewtech-technologies/dare-method (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,129 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.