#macro #proc-macro #token-stream #version #definition #macro-derive #string

nightly rustc-ap-proc_macro

Manually published version of the package proc_macro in the rust-lang/rust repository from commit 3ec5a99aaa0084d97a9e845b34fdf03d1462c475

1 stable release

Uses old Rust 2015

40.0.0 Feb 21, 2018

#33 in #token-stream


Used in standalone-proc-macro2

MIT/Apache

44KB
941 lines

A support library for macro authors when defining new macros.

This library, provided by the standard distribution, provides the types consumed in the interfaces of procedurally defined macro definitions. Currently the primary use of this crate is to provide the ability to define new custom derive modes through #[proc_macro_derive].

Note that this crate is intentionally very bare-bones currently. The main type, TokenStream, only supports fmt::Display and FromStr implementations, indicating that it can only go to and come from a string. This functionality is intended to be expanded over time as more surface area for macro authors is stabilized.

See the book for more.

Dependencies

~3MB
~53K SLoC