Update Godot api level, add gdext_coroutine

This commit is contained in:
Melody Becker 2025-03-17 08:40:29 +01:00
parent c8cd06d325
commit 1232ac3611
No known key found for this signature in database
5 changed files with 19 additions and 2 deletions

View file

@ -1,6 +1,6 @@
[configuration]
entry_symbol = "gdext_rust_init"
compatibility_minimum = 4.1
compatibility_minimum = 4.2
reloadable = true
[libraries]

10
rust/Cargo.lock generated
View file

@ -434,11 +434,21 @@ name = "gd-wireportal"
version = "0.1.0"
dependencies = [
"ashpd",
"gdext_coroutines",
"godot",
"godot_tokio",
"pipewire",
]
[[package]]
name = "gdext_coroutines"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92b254068dbdb5a5a9d702039f5b741ac9a454617c28f69c5cc6c31792c7d11d"
dependencies = [
"godot",
]
[[package]]
name = "gdextension-api"
version = "0.2.2"

View file

@ -5,6 +5,7 @@ edition = "2021"
[dependencies]
ashpd = "0.11.0"
gdext_coroutines = "0.7.1"
godot = "0.2.4"
godot_tokio = "0.3.0"
pipewire = "0.8.0"

View file

@ -1,3 +1,9 @@
#![feature(coroutines)]
#![feature(coroutine_trait)]
#![feature(stmt_expr_attributes)]
#![feature(unboxed_closures)]
#![cfg_attr(feature = "async", feature(async_fn_traits))]
use godot::{classes::Engine, prelude::*};
use godot_tokio::AsyncRuntime;

View file

@ -4,7 +4,7 @@ use ashpd::desktop::{
};
use godot::prelude::*;
use godot_tokio::AsyncRuntime;
use std::thread;
//use std::thread;
#[derive(GodotClass)]
#[class(base=RefCounted)]