rust

Organize Rust codebases into domain-oriented folders with clear boundaries.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Alpha-Innovation-Labs/opennexus --skill rust-alpha-innovation-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust
Source: https://github.com/Alpha-Innovation-Labs/opennexus/tree/main/.nexus/ai_harness/rules/rust
Command: npx skills add https://github.com/Alpha-Innovation-Labs/opennexus --skill rust-alpha-innovation-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Align Rust projects to a consistent, domain-oriented structure to reduce onboarding time and architectural drift.

Core Features & Use Cases

  • Domain-oriented layout: organizes code by domain and feature rather than by type, with top-level folders like app/, core/, features/, adapters/, services/.
  • Separation of concerns: places orchestration glue in app/ and keeps domain logic in core/ and features/ for maintainability.
  • Clear naming and boundaries: each subdomain or feature gets its own folder with explicit boundaries and naming conventions.

Quick Start

Align your Rust project to the prescribed layout by reorganizing folders to match the recommended structure.

Frequently Asked Questions about rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize a Rust project structure to reduce architectural drift?

To reduce architectural drift, organize your Rust project structure using a domain-oriented layout with top-level folders like app/ for orchestration and core/ for domain logic. This enforces clear boundaries between app code and features.

What is the best way to separate domain logic from application code in Rust?

Separate domain logic from application code in Rust by placing orchestration glue in the app/ folder and keeping domain logic in core/ and features/ folders. This ensures maintainability and clear separation of concerns.

Does domain-driven design work for both Rust libraries and binaries?

Domain-driven design works for both Rust libraries and binaries of any size. The structure guides organization of src, adapters, services, config, and utils, ensuring consistent boundaries across different project types.

Where should I place shared utilities in a Rust codebase?

Place shared utilities in the utils/ folder of your Rust codebase. The domain-oriented structure prescribes explicit boundaries, ensuring naming consistency and clear placement for shared utilities alongside features and adapters.

Can I apply a domain-oriented folder structure to an existing Rust codebase?

You can apply a domain-oriented folder structure to an existing Rust codebase by reorganizing folders to match the recommended layout. Align your src, core, features, and adapters directories to reduce onboarding time.

Why use a domain-oriented structure instead of type-based organization in Rust?

Use a domain-oriented structure instead of type-based organization in Rust to reduce onboarding time and architectural drift. Organizing code by domain and feature with explicit boundaries ensures naming consistency and clearer maintainability.