Expand description
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.