#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 153222/week @ 2024-09-20 135943/week @ 2024-09-27 175817/week @ 2024-10-04 151573/week @ 2024-10-11 169707/week @ 2024-10-18 196901/week @ 2024-10-25 164113/week @ 2024-11-01 185322/week @ 2024-11-08 162463/week @ 2024-11-15 117138/week @ 2024-11-22 89841/week @ 2024-11-29 170437/week @ 2024-12-06 160076/week @ 2024-12-13 46443/week @ 2024-12-20 57654/week @ 2024-12-27 124953/week @ 2025-01-03

426,249 downloads per month
Used in 380 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

~94KB