#macro #type

proc-macro-utils

low-level utilities on proc-macro and proc-macro2 types

13 releases (breaking)

0.10.0 May 21, 2024
0.9.1 Mar 13, 2024
0.8.0 May 14, 2023
0.5.1 Mar 2, 2023

#80 in Procedural macros

Download history 189439/week @ 2024-12-08 145194/week @ 2024-12-15 36890/week @ 2024-12-22 79144/week @ 2024-12-29 158984/week @ 2025-01-05 174819/week @ 2025-01-12 129492/week @ 2025-01-19 150581/week @ 2025-01-26 158584/week @ 2025-02-02 168370/week @ 2025-02-09 165572/week @ 2025-02-16 203389/week @ 2025-02-23 209044/week @ 2025-03-02 205794/week @ 2025-03-09 198847/week @ 2025-03-16 220513/week @ 2025-03-23

838,330 downloads per month
Used in 441 crates (5 directly)

MIT/Apache

79KB
1.5K SLoC

proc-macro-utils

CI Status Crates.io Docs.rs Documentation for main

Some utility functions on proc-macro types.


lib.rs:

Some useful functions on proc_macro and proc_macro2 types

E.g. pushing tokens onto TokenStream and testing for specific punctuation on TokenTree and Punct

It also adds the assert_tokens! and assert_expansion! macros to improve unit testability for proc-macros.

Dependencies

~90KB