The crate static_str_ops addressed this issue, by allocating a hash set under the hood, and return the reference as the result. Along with this crate, a set of utilities are provided, including `static_format!`, `static_concat!`, and `staticize_once!` which can be used to initialize static strings with the `call_once` semantic.