3 ms·
Even if its not just "mutable" state there are a lot of undesirable situations for multiple package imports in rust: 1. Singletonish things like global allocat
by bbatha 8y ago
Even if its not just "mutable" state there are a lot of undesirable situations for multiple package imports in rust:
1. Singletonish things like global allocators, rayon-core, etc
2. You may have made a package static safe to mutate with a mutex, but it could be a bad thing to have different versions of that mutex.
3. Compile time computed tables (unicode table, perfect hashes, etc) could be imported multiple times ballooning the binary.
4. ABI/type compatibility with any reexported types
- steveklabnik 8y agoOh totally. Thanks for listing those out.