Skip to content

Declarative (macro_rules!) macro improvements #629

Open

Description

@tomassedovic
Metadata
Contact @joshtriplett
Team(s) lang (@joshtriplett)
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.


This issue is intended for status updates only.

For general questions or comments, please contact a goal owner or post in the Zulip topic.

Activity

  1. added this to the 2026 milestone on May 5, 2026
  2. tomassedovic commented on May 5, 2026

    @tomassedovic
    ContributorAuthor

    This issue is intended for status updates only.

    For general questions or comments, please contact the owner(s) directly.

  3. locked and limited conversation to collaborators on May 5, 2026
  4. joshtriplett commented on May 21, 2026

    @joshtriplett
    Member

    Having conversations with @oli-obk at the Rust All Hands about macro fn.

  5. joshtriplett commented on Sep 18, 2026

    @joshtriplett
    Member

    macro fn is still blocked on comptime and the ability to do CTFE at macro expansion time.

    Planning to propose stabilization of declarative attribute and derive macros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions