Singletons (in Rust)January 2021 4745 23 mins RustSingletons are generally not easy to implement safely in any programming language, especially in a multithreaded environment. However Rust’s emphasis on (possibly guaranteed) on memory and concurrency safety sprinkled with some additional language constraints makes singletons awkward to implement at best, or plain annoying at worst. There are solutions however. This post will solely focus on the concept of Singletons, in general, and how to implement them in Rust. ...