Is there a way to create a static Rc
variable? Only Arc
seems to work:
lazy_static! {
static ref MY_STRING: Arc<String> = Arc::new(String::from("Hello"));
}
I now have to use Arc
everywhere (due to how type usage propagates “virally”). Is that a problem? It seems unnecessary for my single-threaded code.