#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

#150 in Procedural macros

Download history 106211/week @ 2024-08-08 117889/week @ 2024-08-15 114581/week @ 2024-08-22 103954/week @ 2024-08-29 131558/week @ 2024-09-05 135508/week @ 2024-09-12 138707/week @ 2024-09-19 138215/week @ 2024-09-26 166594/week @ 2024-10-03 156002/week @ 2024-10-10 165593/week @ 2024-10-17 194812/week @ 2024-10-24 160810/week @ 2024-10-31 187650/week @ 2024-11-07 168782/week @ 2024-11-14 140382/week @ 2024-11-21

698,329 downloads per month
Used in 359 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

~105KB