I’m designing a compiler plugin which reads external data from disk files, and takes the filename as a
#[plugin(...)] parameter. I’m thinking of storing the file handle globally with
I rg’d the rustc source and surprisingly found zero usage of mutable global variables (includes interior mutability). I’m now afraid of this being an anti-pattern. Is it a good idea to store the file handle as global? If not, how should I achieve the thing?