Brief
A basic Atom (string) registry for use with ID strings.
For when an application contains and passes around many constant strings (mainly de/serialized strings), this should reduce the overall memory footprint and slightly increase cache usage
Warning: The performance implications of this crate should be tested to ensure it's a good fit for your use-case. There are many sitatuations where such a caching mechanism is simply unnecessary and this crate may easily harm performance due to the memory allocation required to register an atom, as well as the hash-lookup.
Inspiration for this project:
- Use Arc instead of Vec - Logan Smith (YouTube/@_noisecode)
- Atom Tables - Microsoft Windows
Usage
To use TOMT_BevyCSS just add a StyleSheet
with a loaded css
file to any entity and all style sheet rules will be applied to the entity and all its [descendants
][80] (children of children of children and so on).
use Atom;
Changelog
Version | Changes |
---|---|
0.1.0 | Initial-release |
0.1.1 | Fixed potential hash-collision bug |
Contributing
Got some idea, feedback, question or found a bug? Feel free to open an issue at any time!
License
TOMT_Atom is dual-licensed under either:
- MIT License (in repository or from [source][licence-MIT-remote])
- Apache License, Version 2.0 (in repository or from source)
This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are [very good reasons][55] to include both.