Event

Event
09:30
-
09:55
Day 2
Async Rust in Godot 4: Leveraging the engine as a runtime
Assembly-Event
<p><a href="https://github.com/godotengine/godot">Godot 4</a>’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 (<a href="https://github.com/godot-rust/gdext"><code>godot-rust</code></a>), enabling Rust developers to write async code without introducing external runtimes. </p> <p>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 <code>Future</code> and <code>async</code> 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 <code>async</code> while interacting with the engine's C++ code over FFI on potentially multiple threads. </p> <p>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.</p>