NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #131 most downloaded on crates.io
A proc-macro library for reading attributes into structs when implementing custom derives.
Last release 1 months ago
20 Aug 2026
Release timing varies
gaps range from 8 days to 9 months
Nearly every release is documented
notes for 57 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
9 years old
69 releases · first in 2017
Don't assume fields using with impl FromMeta #433
Add impl ToTokens for SpannedValue #423
One column per quarter.
Bump MSRV to 1.88.0; there have been no code changes that caused this, but due to dependency issues CI no longer works on 1.56.0 #357
YANKED Pinned dependencies made this version cause conflicts with other crates.
YANKED Pinned dependencies made this version cause conflicts with other crates.
fnv dependency, as runtime performance gain does not justify additional dependency. This was exposed to users of darling::usage, so it may be breaking for them #373#[darling(default = || expr(val))] support, allowing a closure where a path was previously required #380darling::util::Callable as literal stringsFix: Forward Override::<T>::from_expr to T::from_expr #371
Override::<T>::from_expr to T::from_expr #371Add #[darling(from_expr = ...)] when deriving FromMeta to support overriding the key-value form #369
#[darling(from_expr = ...)] when deriving FromMeta to support overriding the key-value form #369#[darling(with = ...)] on the generics field when deriving FromDeriveInput.union. #365Track all alternate field names, and show them in error message if there aren't too many. #325
Potentially breaking: Emit error when an attribute path is present in both attributes and forward_attrs . #336
attributes and forward_attrs. #336SpannedValue::into_inner #342#[darling(derive_syn_parse)] to also impl syn::parse::Parse when deriving FromMeta #285impl FromMeta for syn::TypePath support both quote-wrapped and bare values #351util::PreservedStrExpr #346UsesTypeParams and UsesLifetimes for WithOriginal #215<() as FromMeta>::from_list to allow use of () as a #[darling(flatten)] target #353Support #[darling(with = ...)] on the data field when deriving FromDeriveInput . This allows the use of simpler receiver types, such as a Vec of enum
#[darling(with = ...)] on the data field when deriving FromDeriveInput. This allows the use of simpler receiver types, such as a Vec of enum variants.proc-macro2 to 1.0.86.#[darling(with = ...)] on fields in FromDeriveInput, FromMeta, FromField, etc. #309darling::util::Callable to accept a path or closure as a meta-item expression#[darling(from_word = ...)] and #[darling(from_none = ...)] to control shorthand and fallback behaviors for structs and enums deriving FromMeta #320FromMeta impl for syn::ExprRange #329Add #[allow(clippy::manual_unwrap_or_default)] to all generated impls to avoid causing clippy fails in crates using darling #296
Allow word-form for newtype enum variants whose only field produces a value when from_none is called on their type #249
Add #[darling(with = ...)] support to attrs magic field to allow using custom receiver types for attrs #273
#[darling(with = ...)] support to attrs magic field to allow using custom receiver types for attrs #273Add #[darling(flatten)] to allow forwarding unknown fields to another struct #146
Fix some missing syn invisible group handling in FromMeta impls #263
Add Flag::span inherent method, as Flag can no longer impl syn::Spanned #242
Flag::span inherent method, as Flag can no longer impl syn::spanned::Spanned #242Accept bare paths in #[darling(default = ...)] #258
#[darling(default = ...)] #258FromMeta impl for PathBuf #259FromMeta implementation for enums #260
FromMeta::from_list to provide a consistent API for heterogeneous enums that include a mix of unit, newtype and struct variants#[darling(word)] attribute for unit enum variants (See #63 for details)Add FromMeta impl for u128 and i128 #243
FromMeta impl for u128 and i128 #243Add Clone impl for NestedMeta #230
Clone impl for NestedMeta #230Replacement for the deprecated AttributeArgs:
Replace all occurrences of syn::NestedMeta with darling::ast::NestedMeta.
Replacement for the deprecated AttributeArgs:
// Before
parse_macro_input!(args as AttributeArgs);
// After
match NestedMeta::parse_meta_list(args) {
Ok(v) => v,
Err(e) => {
return TokenStream::from(Error::from(e).write_errors());
}
};
LifetimeDef is now LifetimeParam.as_lifetime_def is renamed to as_lifetime_param.syn::spanned::Spanned.In previous versions of darling, arbitrary expressions were passed in attributes by wrapping them in quotation marks.
v0.20.0 preserves this behavior for syn::Expr, but as a result a field expecting a syn::Expr cannot accept a string literal - it will incorrectly attempt to parse the contents. If this is an issue for you, please add a comment to #229.
Add support for child diagnostics when diagnostics feature enabled #224
diagnostics feature enabled #224Re-export syn from darling to avoid requiring that consuming crates have a syn dependency.
syn from darling to avoid requiring that consuming crates have a syn dependency.<SpannedValue<T> as FromMeta> impl to more precisely capture the value span, as opposed to the span of the entire item.darling::util::{AsShape, Shape, ShapeSet} to improve "shape" validation for structs and variants. #222Derived impls of FromMeta will now error on literals, rather than silently ignoring them. #193
Fix a bug where using a trait that accepts #[darling(attributes(...))] without specifying any attributes would emit code that did not compile. #183
BREAKING CHANGE: Remove many trait impls from util::Flag. This type had a number of deref and operator impls that made it usable as sort-of-a-boolean.…
util::Flag.
This type had a number of deref and operator impls that made it usable as sort-of-a-boolean.
Real-world usage showed this type is more useful if it's able to carry a span for good errors,
and that most of those impls were unnecessary. #179#[darling(default)] on Option<T> and Flag fields #161proc-macro2 dependency to 1.0.37 #180quote dependency to 1.0.18 #180syn dependency to 1.0.91 #180Impl FromMeta for syn::Visibility #173
FromMeta for syn::Visibility #173Add error::Accumulator for dealing with multiple errors #164
Impl FromMeta for syn::ExprPath #169
FromMeta for syn::ExprPath #169Add FromAttributes trait and macro #151
FromAttributes trait and macro #151Update darling to 2018 edition #129
Update darling to 2018 edition #129
Add and_then to derive macros for darling
and_then to derive macros for darlingFix FromMeta impl for char not to panic #126
FromMeta impl for char not to panic #126Impl FromMeta for HashMap and HashMap
FromMeta for HashMap<Ident, V> and HashMap<Path, V>Impl FromMeta for syn::ExprArray #122
POSSIBLY BREAKING: Derived impls of FromDeriveInput, FromField, FromVariant, and FromTypeParam will now error when encountering an attribute darling h
FromDeriveInput, FromField, FromVariant, and FromTypeParam will now error when encountering an attribute darling has been asked to parse that isn't a supported shape.
Any crates using darling that relied on those attributes being silently ignored could see new errors reported in their dependent crates. #113syn::spanned::Spanned for darling::util::SpannedValue #113darling::util::parse_attribute_to_meta_list to provide useful errors during attribute parsing #113impl From<syn::Error> for Error to losslessly propagate syn errors #116Bump minor version due to unexpected breaking change #107
Add discriminant magic field when deriving FromVariant #105
discriminant magic field when deriving FromVariant #105Bump syn dependency to 1.0.1 #83
Fix test compilation errors #81
- Bump syn and quote to 1.0 #79 - Increase rust version to 1.31
Enable "did you mean" suggestions by default
Added "did you mean" suggestions for unknown fields behind the suggestions flag #60
suggestions flag #60Error::unknown_field_with_alts to support the suggestion use-case.ast::Fields::len and ast::Fields::is_empty methods.Accept unquoted positive numeric literals #52
FromMeta to the syn::Lit enum and its variantsUse syn::Error to provide precise errors before proc_macro::Diagnostic is available
syn::Error to provide precise errors before proc_macro::Diagnostic is availablediagnostics feature flag to toggle between stable and unstable error backendsallow_unknown_fields to support parsing the same attribute multiple times for different macros #51darling attributesDeprecate set_span from 0.8.2, as spans should never be broadened after being initially set
set_span from 0.8.2, as spans should never be broadened after being initially setAdd spans to errors to make quality warnings and errors easy in darling. This is blocked on diagnostics stabilizing.
darling::util::SpannedValue so proc-macro authors can remember position information alongside parsed values.Nothing published for this version
Update dependency on syn to 0.15 #44. Thanks to @hcpl
syn to 0.15 #44. Thanks to @hcplUpdate dependencies on syn and proc-macro2
syn and proc-macro2util::IdentString, which acts as an Ident or its string equivalentAdd support for Uses* traits in where predicates
Uses* traits in where predicatesAdd usage module for tracking type param and lifetime usage in generic declarations
Fix an issue where the syn update broke shape validation #36
syn update broke shape validation #36Renamed FromMetaItem to FromMeta, and renamed from_meta_item method to from_meta
FromMetaItem to FromMeta, and renamed from_meta_item method to from_metaderive(FromMetaItem) which panics and redirects users to FromMetaAdd ast::Generics and ast::GenericParam to work with generics in a manner similar to ast::Data
ast::Generics and ast::GenericParam to work with generics in a manner similar to ast::Dataast::GenericParamExt to support alternate representations of generic parametersutil::WithOriginal to get a parsed representation and syn's own struct for a syntax blockFromGenerics and FromGenericParam traits (without derive support)generics magic field to invoke FromGenerics trait during parsingFromTypeParam trait #30. Thanks to @upsuperUpdate dependencies on proc-macro, quote, and syn #26. Thanks to @hcpl
proc-macro, quote, and syn #26. Thanks to @hcplYANKED
YANKED
Derive Default on darling::Ignored (fixes #25).
Default on darling::Ignored (fixes #25).Support proc-macro2/nightly #24. Thanks to @kdy1
Update syn to 0.12 #20. Thanks to @Eijebong
Update lazy_static to 1.0 #15. Thanks to @Eijebong
lazy_static to 1.0 #15. Thanks to @EijebongYour coding agent can read these notes before it upgrades. Set up the MCP server →