In Rust 1.73.0, it'll be easier to use thread_local Cells and RefCells - eviltoast