Skip to content

Declarative (macro_rules!) macro improvements #629

Description

@tomassedovic
Metadata
Point of contact @joshtriplett
Team(s) lang
Goal document 2026/macro-improvements

Summary

I propose to continue improving the state of declarative macros (e.g.
macro_rules! macros) in Rust, with the eventual aim of making them just as
capable as proc macros while being easier to write and faster to compile.

I'll also prototype extensions to the declarative macro system to make macros
easier to write. I intend to collaborate with the "Reflection and Comptime"
goal
,
and work with experimental implementations of comptime when available.

The initial focus of this goal is the stabilization of declarative attribute
and derive macros, along with enough functionality to enable the adoption of
such macros by a reasonable subset of crates without substantive degradation of
functionality or usability.

Tasks and status


Note: we have updated the body to match the 2026 goal. Your original text is preserved below.

Details

Metadata
Point of contact @joshtriplett
Team(s) lang
Goal document 2026/macro-improvements

Summary

I propose to continue improving the state of declarative macros (e.g.
macro_rules! macros) in Rust, with the eventual aim of making them just as
capable as proc macros while being easier to write and faster to compile.

I'll also prototype extensions to the declarative macro system to make macros
easier to write. I intend to collaborate with the "Reflection and Comptime"
goal
,
and work with experimental implementations of comptime when available.

The initial focus of this goal is the stabilization of declarative attribute
and derive macros, along with enough functionality to enable the adoption of
such macros by a reasonable subset of crates without substantive degradation of
functionality or usability.

Tasks and status

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions