Surrounding all the code with a top-level block is exactly what I was trying to avoid. Otherwise I would just stick with a proc macro attribute attached to a surrounding module. I see why using statics in the macros is not guaranteed to work in the future, but isn’t there absolutely no way to make macros communicate?