I can’t find it, but I know there was some proposal for "scoped 'static" previously.
But it seems the best way to handle this is to do so similarly to the minimal Rust runtime or “life before main”:
In the real main, do some global setup and promise (using unsafe and maybe static mut) that you have effectively 'static data. Then call the application main. Cleanup is after application main returns.
Unfortunately this is broken by the fact 'static allows unscoped thread spawning, so references could outlive the expiry of the application main. This means that teardown within the real main can’t put global state into an unsafe state.
Rustc handles this kind of problem by threading 'ctx through most of its interesting data structures and functions. There’s definitely design room for “named, scoped 'static replacements” (ambient lifetimes), but I don’t know what it would look like yet, or how much it would hurt from losing access to 'static manipulators.