Function runtime_config
pub fn runtime_config() -> Arc<BurnConfig>Expand description
Returns the current [BurnConfig], cached in thread-local storage on native targets.
On the first call from a given thread this fetches the global config via
[BurnConfig::get] (which locks a spin mutex) and caches the Arc thread-locally.
Subsequent calls on the same thread only pay an Arc clone. On no_std builds this
is equivalent to [BurnConfig::get].
Safe because [BurnConfig::set] panics after the first read, so the cached snapshot
matches the global singleton for the whole program lifetime.