add module system and move sensor into core with it

This commit is contained in:
2025-09-24 16:11:39 -04:00
parent 2adf7a43a1
commit 26c248dcba
13 changed files with 515 additions and 342 deletions

View File

@@ -87,6 +87,10 @@ impl<W> WidgetId<W> {
unsafe { std::mem::transmute(self) }
}
pub fn key(&self) -> Id {
self.id.duplicate()
}
pub(super) fn cast_type<W2>(self) -> WidgetId<W2> {
// safety: self is repr(C) and generic only used for phantom data
unsafe { std::mem::transmute(self) }