Async Rust in Godot 4: Leveraging the Engine as a Runtime
- Track: Rust
- Room: UB2.252A (Lameere)
- Day: Sunday
- Start: 10:30
- End: 10:55
- Video only: ub2252a
- Chat: Join the conversation!
Godot 4’s built-in async support for GDScript has long been a powerful feature - but what about Rust? In February 2025, I implemented async support for Godot’s Rust bindings (godot-rust), enabling Rust developers to write async code without introducing external runtimes.
In this talk, I’ll walk you through the architecture: how we adapted Godot’s async execution (already designed for GDScript) to work with Rust’s Future and async abstractions, and how we minimized cost by reusing the engine’s existing event loop and task scheduler. We’ll dive into the implementation details - including how Godot-specific futures are constructed, polled, and scheduled - and discuss the challenges we faced when implementing async while interacting with the engine's C++ code over FFI on potentially multiple threads.
This talk will be especially valuable for developers interested in embedding async logic godot and other game engines or understanding how async can be made “engine-native” rather than externally bolted on.
Speakers
| Jovan Gerodetti |