M3 app model: App, Entity, Context, subscriptions, events, globals
- app: port of GPUI's App effect cycle (update / flush_effects with deferred subscription activation and notification dedup), EntityMap (typed cells, leasing, explicit release), Context<T> (notify, emit, observe, subscribe, observe_self/subscribe_self, on_release, observe_release, observe_global, defer_call), SubscriberSet and Subscription. - TypeId-keyed maps become EventKey[E] / GlobalKey[G]: values cross the app's untyped maps as closures writing into the key's typed slot. - No Drop: App::release replaces the last-handle drop; subscriptions end with unsubscribe() or when their entity is released. - Fail loudly on re-entrant updates, reads during updates, use after release, cross-app use, missing globals, global_mut outside an update. - Tests: GPUI's subscription tests ported, plus app-model and panic tests. - examples/counter; PORTING.md M3 status, deviations, toolchain notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cca9a49c51
commit
64bf747047
15 files changed
+1940
-8
No files matched your search
@@ -0,0 +1,5 @@
|
||||
import {
|
||||
"experiments/gpui/app",
|
||||
}
|
||||
|
||||
pkgtype(kind: "executable")
|
||||
Reference in new issue
Block a user