4 releases
0.1.3 | Nov 14, 2024 |
---|---|
0.1.2 | Nov 14, 2024 |
0.1.1 | Nov 14, 2024 |
0.1.0 | Nov 14, 2024 |
#16 in #volatile
56 downloads per month
Used in vtid
6KB
92 lines
Volatile Type ID (Vtid) generator.
How it works
- Each time a crate is recompiled, a counter in a lock file is incremented to create a new version
- This version becomes the base ID for all types in that compilation unit
- When combined with type information, it creates unique IDs that:
- Are consistent for the same type within one compilation
- Automatically version bump on recompilation
- Allow tracking type changes across hot reloads
- Maintain thread-safety through file locking
The versioning ensures that if a type's definition changes and the crate is recompiled, the old and new versions of the type will have different IDs.
Dependencies
~1.3–1.8MB
~39K SLoC