Initializing a Rust variable passed to async code such as tokio and hyper
问题 I have a value that cannot be computed at compile time. It needs to be computed before any of the app code runs, and then it will only be read throughout the lifetime of the app. It also needs to be passed around to executors such as tokio and hyper handlers. How can I create such a value safely, idiomatically and without unneeded performance losses? If I create it in main and pass it to hyper , it does not live long enough. If I create it with lazy_static! , it only gets computed when it's