i want to write tests (which run on a desktop/server, i.e. linux/windows on it, triggered using `cargo test`) which go against some hardware (via `postcard-rpc` to one target, another communication method to another). since cargo runs tests in parallel by default there's a real risk that they will interfere with each other (think one thread turning something on for a test while the other turns it off). in other languages - e.g. java - i'd have my test class which contains a single copy of the client used to talk to the hardware and the tests would be executed single-threaded. i can of course run the tests with `cargo test -- --test-threads=1`, but i have no guarantee that it'll always be triggered like this (someone could forget and just run `cargo test`. what would be the best approach to prevent this? here are a few things i thought about: in all of these cases i would store my `Client` in a `static` variable within `mod tests`. * use `thread_local!` and then use `CLIENT.with(|client| { ... });` for all tests - that's more or less the API i'm looking for, but obviously doesn't work since it is per-thread * use a `OnceCell` and an `fn client() -> Client` which initialises it. while this ensures that there's a single client (can't have more than one talking to the hardware!) that doesn't stop multiple threads from accessing it in parallel * use a `Mutex`: that needs the `static` variable to be `static mut`, making it all `unsafe` which i _really_ don't want 🙁 i'm probably missing the easy, obvious answer?