#proc-macro #macro #low-level #utilities #tokens #token-stream #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

#76 in Procedural macros

Download history 156110/week @ 2024-11-16 102205/week @ 2024-11-23 94071/week @ 2024-11-30 188577/week @ 2024-12-07 146286/week @ 2024-12-14 37097/week @ 2024-12-21 77689/week @ 2024-12-28 157928/week @ 2025-01-04 175852/week @ 2025-01-11 129215/week @ 2025-01-18 151649/week @ 2025-01-25 157970/week @ 2025-02-01 168864/week @ 2025-02-08 163960/week @ 2025-02-15 203715/week @ 2025-02-22 208702/week @ 2025-03-01

775,050 downloads per month
Used in 425 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

~89KB