Procedural macros

Crates to help you write procedural macros in Rust.

Most popular

dtolnay Parser for Rust source code Syn is a parsing library for parsing a stream of Rust tokens into a syntax tree of Rust source code. Currently this librar
 

jeltef derive_more Rust has lots of builtin traits that are implemented for its basic types, such as Add, Not, From or Display. However, when wrapping these
 

dtolnay Rust Quasi-Quoting This crate provides the quote! macro for turning Rust syntax tree data structures into tokens of source code. Procedural macros in
 

jbaublitz getset Getset, we're ready to go! A procedural macro for generating the most basic getters and setters on fields. Getters are generated as fn field(&s
 

texitoi Rust mdo Presentation Rust mdo is a monadic do notation using macros and duck typing. It provides a syntax extension providing something that looks li
 

dtolnay Procedural macros in expression position As of Rust 1.30, the language supports user-defined function-like procedural macros. However these can only b
 

mitsuhiko procspawn This crate provides the ability to spawn processes with a function similar to thread::spawn. Unlike thread::spawn data cannot be passed by t
 

8bitmate I thought Rust doesn't have reflection...? This crate explores what it could look like to tackle the 80% use case of custom derive macros through a pr
 

manishearth absolution "Freedom from syn" This crate provides an introspectible token tree representation for writing Rust proc macros. It's still somewhat unstab
 

setzer22 Blackjack Your Rusty 🦀 procedural 3d modeler Blackjack is a procedural modelling application, following the steps of great tools like Houdini or Blen
 

ekzhang Crepe   Crepe is a library that allows you to write declarative logic programs in Rust, with a Datalog-like syntax. It provides a procedural macro tha
 

ahrefs derive-ocaml - Custom derive and procedural macros for easier ocaml <-> rust FFI WARNING this crate is very experimental derive-ocaml is based on top
 

Diggsey spanr A tool for procedural macro authors to be able to interactively view and debug the Spans on generated code. Screenshot Example usage #[proc_macr
 

fabianboesiger Debug Plotter This crate provides a convenient macro to quickly plot variables. Example In this example, we quickly want to plot the variables a, b, a
 

goncalerta Rust Quasiquoter This crate implements the quote! macro as a procedural macro, instead of the original quote! macro, implemented with macro_rules!. Th
 

azriel91 Proc Macro Roids Traits and functions to make writing proc macros more ergonomic. proc_macro_roids = "0.7.0" Makes writing procedural macros much easi
 

jamesmunns toml-cfg Rough ideas: Crates can declare variables that can be overridden Anything const, e.g. usize, strings, etc. (Only) The "root crate" can overri
 

remi-dupre Advent of Code helper This crate provides a macro to generate a handful main for your advent of code participation. The intention is to provide someth
 

danielkeep parse-generics This repository contains several pieces related to the proposed RFC #1583: parse-generics-poc - a proof-of-concept implementation of th
 

jkelleyrtp Pipette A small crate for using pipes in Rust. use pipette::{Pipeline, pipe}; let input = 1; let output = pipe(( input |a| a * 2, |a| a
 

jiftechnify valq   valq provides a macro for querying and extracting value from structured data in very concise manner, like the JavaScript syntax. Look & Feel: u
 

mooli Adds #[zoet] macro to reduce boilerplate when implementing common traits. If you are sick of writing impl Deref for Bar etc. and it didn't compile bec
 

vongaisberg gpt3_macro Rust macro that uses GPT3 codex to generate code at compiletime. Just describe what you want the function to do and (optionally) define a f
 

vultix js-macros Quickly prototype Rust procedural macros using JavaScript or TypeScript! Have you ever thought "this would be a great use case for a procedu
 

diwic inner - The inner! macro descends into an enum variant. It’s more flexible than try!() and unwrap(), and it works with your enum, too!
 

magiclen macro enum-ordinalize - This crates provides a procedural macro to let enums not only get its variants’ ordinal but also be constructed from an ordinal
 

WilliamVenner inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There