derive_more

Rust procedural macro library that adds additional derive macros missing from the standard library. Provides #[derive(Display, From, Into, FromStr, Add, Sub, Mul, Div, Index, IndexMut, Constructor, Error, IsVariant, Unwrap, TryInto)] and many more. Eliminates boilerplate for common trait implementations — especially useful for newtype patterns and domain-specific types.

Evaluated Mar 06, 2026 (0d ago) v1.x
Homepage ↗ Repo ↗ Developer Tools rust derive macros boilerplate newtype display from into
⚙ Agent Friendliness
67
/ 100
Can an agent use this?
🔒 Security
98
/ 100
Is it safe for agents?
⚡ Reliability
83
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
80
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
90
Secret Handling
100

Compile-time macro library. No runtime security surface. Proc-macro execution is sandboxed by Rust's macro system.

⚡ Reliability

Uptime/SLA
92
Version Stability
78
Breaking Changes
72
Error Recovery
90
AF Security Reliability

Best When

You have many newtype wrappers or domain types in Rust that need standard trait implementations — derive_more eliminates hundreds of lines of From/Into/Display boilerplate.

Avoid When

You need custom logic in trait implementations — the macros provide fixed templates; complex formatting or conversion logic requires manual impl.

Use Cases

  • Implement Display, From, Into traits for newtype wrappers in Rust domain models without manual boilerplate
  • Derive arithmetic operators (+, -, *, /) for numeric newtype wrappers (UserId, Price, Count) with #[derive(Add, Sub)]
  • Generate constructor methods, variant predicates, and unwrap helpers for enums with derive_more macros
  • Implement std::error::Error for custom error types with #[derive(Error)] alongside thiserror
  • Add Display formatting to Rust enum variants for human-readable logging and debugging output

Not For

  • Custom error types with structured messages — thiserror is more expressive for error type definitions
  • Display formatting requiring complex logic — derive_more's Display is template-based; custom Display impl needed for dynamic formatting
  • Teams using macros conservatively — derive_more adds compile-time dependency and proc-macro expansion overhead

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Compile-time macro library. No runtime, no authentication.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT license.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • derive_more 1.x introduced breaking changes from 0.99 — enable specific features in Cargo.toml (e.g., derive_more = { features = ["display", "from"] }) instead of enabling all features
  • #[derive(Display)] requires all struct fields to implement Display — structs with non-Display fields require custom fmt attribute to select which fields to format
  • #[derive(From)] generates From impls for each inner type — in enums with multiple variants of the same type, ambiguity causes compile errors
  • #[derive(Error)] requires the std or no-std feature matching your target — no-std environments need explicit feature selection
  • Arithmetic derives (#[derive(Add)]) operate element-wise on struct fields — ensure all fields support the operation
  • Compile time increases with many proc-macro derives — in large codebases, selectively enable only needed features to minimize build time impact

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for derive_more.

$99

Scores are editorial opinions as of 2026-03-06.

5220
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered