Skip to content

#[func(virtual)] now supports async fn for GDScript coroutines#1645

Draft
Bromeon wants to merge 1 commit into
masterfrom
feature/async-gdscript-calls
Draft

#[func(virtual)] now supports async fn for GDScript coroutines#1645
Bromeon wants to merge 1 commit into
masterfrom
feature/async-gdscript-calls

Conversation

@Bromeon

@Bromeon Bromeon commented Jun 23, 2026

Copy link
Copy Markdown
Member

Proof-of-concept for

#[func(virtual)]
async fn script_virtual_fn(&mut self) { ... }

which is wired up with godot-rust's async executor and can call GDScript coroutines.
Closes #1640 from @fredericvauchelles.

PR will need some cleanup. I also have plans to generalize this method to allow reflection-style call_async() to arbitrary GDScript functions, not just script-virtual ones.

@Bromeon Bromeon added feature Adds functionality to the library c: async Everything related to async tasks/signals labels Jun 23, 2026
@GodotRust

Copy link
Copy Markdown

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: async Everything related to async tasks/signals feature Adds functionality to the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support GDScript async function for Rust script-virtual function

2 participants