Build a Smaller Godot Binding
Use a tiny fake C engine rather than Godot itself.
- Export C functions that create, call, retain, and destroy opaque objects.
- Wrap the pointer as
EnginePtr<T>with an explicit ownership strategy. - Add a generation/liveness registry and checked downcasting.
- Store a Rust user value behind a runtime borrow cell; expose
bindguards. - Generate one callback trampoline that converts arguments and catches panics.
- Register a class and virtual callback through a static descriptor.
- Add a main-thread-only local future awakened by a foreign callback.
- Demonstrate and reject a guard held across suspension.
- Unregister classes and invalidate handles during simulated reload.
Tests should cover double free, dead handles, wrong dynamic type, re-entrant mutable borrow, callback panic, thread misuse, and unload with live objects.
Production godot-rust adds the full versioned Godot API, procedural macros, inheritance metadata, signals, properties, RPCs, editor integration, generated documentation, platform ABI differences, and extensive integration/sanitizer testing.