The Standard Library as Architecture
- Raw pointers represent the ABI fact that Godot supplies object and value addresses; safe wrappers validate before exposing behavior.
PhantomDataattaches class, ownership, and non-Sendmeaning without changing the pointer layout.TypeIdandHashMapsupport class and dynamic-trait registries.AtomicBooland atomics record initialization/hot-reload state shared with callbacks.Cellstores isolate/main-thread lifecycle state; mutex-backed globals are used for registration paths and fail fast on unexpected concurrency.catch_unwindprevents a panic from leaving a Rust-controlled trampoline.Future,Poll,Waker, and thread-local storage implement the local async bridge.- guard
Dropreleases dynamic borrows even on early returns and panics.
The standard library supplies mechanisms; the binding’s real work is assigning them semantics matching Godot’s ownership contract.