# Antonygiomarxdev Maverick Rust Solid Hexagonal

> Rust — SOLID and hexagonal

- Skill: `tomevault-io/antonygiomarxdev-maverick-rust-solid-hexagonal` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/antonygiomarxdev-maverick-rust-solid-hexagonal`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/antonygiomarxdev-maverick-rust-solid-hexagonal/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/antonygiomarxdev-maverick-rust-solid-hexagonal

---


# Rust — SOLID and hexagonal

## SOLID mapped to Rust

| Principle | In Rust |
|-----------|---------|
| SRP | Focused crates/modules/`impl`; cohesive use-case types |
| OCP | New `enum` variants or new `impl Trait for Struct` |
| LSP | Trait impls honor docs; no surprising panics in “total” methods |
| ISP | Several small traits under `ports/`, not one huge persistence trait |
| DIP | Core defines traits; infrastructure implements them |

## Layout in this kind of monorepo

- **Domain / core**: entities, rules, repository and transport **traits**.
- **Adapters**: sqlite, udp, … — only here do drivers and external schema strings appear.
- **Runtime / binary**: wires concrete implementations into the core.

## Checklist when adding a capability

- [ ] Does core import any I/O crate? → hide it behind a trait.
- [ ] Does the trait force adapters to know too much internal detail? → split the trait (ISP).
- [ ] Does an adapter change break domain tests? → domain tests should use fakes or test doubles for traits, not real SQLite.

---
> Source: [antonygiomarxdev/maverick](https://github.com/antonygiomarxdev/maverick) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-16 -->

