Skip to content

Commit 043cf43

Browse files
authored
Merge pull request #1065 from godot-rust/feature/godot-4.4
Godot 4.4 support
2 parents d1a25b3 + 0bfa5ef commit 043cf43

File tree

10 files changed

+52
-24
lines changed

10 files changed

+52
-24
lines changed

.github/workflows/full-ci.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ jobs:
256256
godot-binary: godot.macos.editor.dev.double.x86_64
257257
rust-extra-args: --features godot/api-custom,godot/double-precision
258258

259-
- name: macos-x86-4.2
259+
- name: macos-x86-4.3
260260
os: macos-13
261-
artifact-name: macos-x86-4.2
261+
artifact-name: macos-x86-4.3
262262
godot-binary: godot.macos.editor.dev.x86_64
263-
godot-prebuilt-patch: '4.2.2'
263+
godot-prebuilt-patch: '4.3'
264264

265265
- name: macos-arm
266266
os: macos-latest
@@ -275,11 +275,11 @@ jobs:
275275
# godot-binary: godot.macos.editor.dev.double.arm64
276276
# rust-extra-args: --features godot/api-custom,godot/double-precision
277277

278-
- name: macos-arm-4.2
278+
- name: macos-arm-4.3
279279
os: macos-latest
280-
artifact-name: macos-arm-4.2
280+
artifact-name: macos-arm-4.3
281281
godot-binary: godot.macos.editor.dev.arm64
282-
godot-prebuilt-patch: '4.2.2'
282+
godot-prebuilt-patch: '4.3'
283283

284284
# Windows
285285

@@ -295,11 +295,11 @@ jobs:
295295
godot-binary: godot.windows.editor.dev.double.x86_64.exe
296296
rust-extra-args: --features godot/api-custom,godot/double-precision
297297

298-
- name: windows-4.2
298+
- name: windows-4.3
299299
os: windows-latest
300-
artifact-name: windows-4.2
300+
artifact-name: windows-4.3
301301
godot-binary: godot.windows.editor.dev.x86_64.exe
302-
godot-prebuilt-patch: '4.2.2'
302+
godot-prebuilt-patch: '4.3'
303303

304304
# - name: windows-4.1
305305
# os: windows-latest
@@ -343,6 +343,12 @@ jobs:
343343

344344
# Linux compat (4.1 disabled, already covered by memcheck)
345345

346+
- name: linux-4.4
347+
os: ubuntu-22.04
348+
artifact-name: linux-4.4
349+
godot-binary: godot.linuxbsd.editor.dev.x86_64
350+
godot-prebuilt-patch: '4.4'
351+
346352
- name: linux-4.3
347353
os: ubuntu-22.04
348354
artifact-name: linux-4.3
@@ -423,7 +429,7 @@ jobs:
423429
- name: "Install Godot"
424430
uses: ./.github/composite/godot-install
425431
with:
426-
artifact-name: godot-linux-4.3
432+
artifact-name: godot-linux-4.4
427433
godot-binary: godot.linuxbsd.editor.dev.x86_64
428434

429435
- name: "Run examples for short time"

.github/workflows/minimal-ci.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,29 @@ jobs:
171171

172172
# Linux compat
173173

174-
- name: linux-4.1
174+
- name: linux-4.4
175175
os: ubuntu-22.04
176-
artifact-name: linux-4.1
176+
artifact-name: linux-4.4
177177
godot-binary: godot.linuxbsd.editor.dev.x86_64
178-
godot-prebuilt-patch: '4.1.4'
178+
godot-prebuilt-patch: '4.4'
179+
180+
- name: linux-4.3
181+
os: ubuntu-22.04
182+
artifact-name: linux-4.3
183+
godot-binary: godot.linuxbsd.editor.dev.x86_64
184+
godot-prebuilt-patch: '4.3'
179185

180186
- name: linux-4.2
181187
os: ubuntu-22.04
182188
artifact-name: linux-4.2
183189
godot-binary: godot.linuxbsd.editor.dev.x86_64
184190
godot-prebuilt-patch: '4.2.2'
185191

186-
- name: linux-4.3
192+
- name: linux-4.1
187193
os: ubuntu-22.04
188-
artifact-name: linux-4.3
194+
artifact-name: linux-4.1
189195
godot-binary: godot.linuxbsd.editor.dev.x86_64
190-
godot-prebuilt-patch: '4.3'
196+
godot-prebuilt-patch: '4.1.4'
191197

192198
# Memory checkers
193199

@@ -239,7 +245,7 @@ jobs:
239245
- name: "Install Godot"
240246
uses: ./.github/composite/godot-install
241247
with:
242-
artifact-name: godot-linux-4.3
248+
artifact-name: godot-linux-4.4
243249
godot-binary: godot.linuxbsd.editor.dev.x86_64
244250

245251
- name: "Run examples for short time"

godot-bindings/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ api-4-2 = []
2828
api-4-2-1 = []
2929
api-4-2-2 = []
3030
api-4-3 = []
31+
api-4-4 = []
3132
# ]]
3233

3334
default = []
@@ -36,7 +37,7 @@ api-custom = ["dep:bindgen", "dep:regex", "dep:which"]
3637
api-custom-extheader = []
3738

3839
[dependencies]
39-
gdextension-api = { version = "0.2.1", git = "https://github.com/godot-rust/godot4-prebuilt", branch = "releases" }
40+
gdextension-api = { version = "0.2.2", git = "https://github.com/godot-rust/godot4-prebuilt", branch = "releases" }
4041

4142
# Do not use bindgen 0.69, it contains regression that forces recompilation of code.
4243
bindgen = { optional = true, version = "0.68", default-features = false, features = ["runtime"] }

godot-bindings/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ fn main() {
2525
if cfg!(feature = "api-4-2-1") { count += 1; }
2626
if cfg!(feature = "api-4-2-2") { count += 1; }
2727
if cfg!(feature = "api-4-3") { count += 1; }
28+
if cfg!(feature = "api-4-4") { count += 1; }
2829
// ]]
2930

3031
assert!(count <= 1, "ERROR: at most one `api-*` feature can be enabled");

godot-bindings/src/import.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub const ALL_VERSIONS: &[(u8, u8, u8)] = &[
2525
(4, 2, 2),
2626
(4, 3, 0),
2727
(4, 4, 0),
28+
(4, 5, 0),
2829
// ]]
2930
];
3031

@@ -57,6 +58,9 @@ pub use gdextension_api::version_4_2_2 as prebuilt;
5758
#[cfg(feature = "api-4-3")]
5859
pub use gdextension_api::version_4_3 as prebuilt;
5960

61+
#[cfg(feature = "api-4-4")]
62+
pub use gdextension_api::version_4_4 as prebuilt;
63+
6064
// ]]
6165

6266
// If none of the api-* features are provided, use default prebuilt version (typically latest Godot stable release).
@@ -75,12 +79,13 @@ pub use gdextension_api::version_4_3 as prebuilt;
7579
feature = "api-4-2-1",
7680
feature = "api-4-2-2",
7781
feature = "api-4-3",
82+
feature = "api-4-4",
7883
feature = "api-custom",
7984
)))]
8085
// ]]
8186

8287
// [version-sync] [[
8388
// [include] current.minor
8489
// [line] pub use gdextension_api::version_$snakeVersion as prebuilt;
85-
pub use gdextension_api::version_4_3 as prebuilt;
90+
pub use gdextension_api::version_4_4 as prebuilt;
8691
// ]]

godot-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ api-4-2 = ["godot-ffi/api-4-2"]
3838
api-4-2-1 = ["godot-ffi/api-4-2-1"]
3939
api-4-2-2 = ["godot-ffi/api-4-2-2"]
4040
api-4-3 = ["godot-ffi/api-4-3"]
41+
api-4-4 = ["godot-ffi/api-4-4"]
4142
# ]]
4243

4344
[dependencies]

godot-core/src/obj/traits.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,15 @@ pub mod cap {
630630

631631
/// Auto-implemented for `#[godot_api] impl XyVirtual for MyClass` blocks
632632
pub trait ImplementsGodotVirtual: GodotClass {
633+
// Cannot use #[cfg(since_api = "4.4")] on the `hash` parameter, because the doc-postprocessing generates #[doc(cfg)],
634+
// which isn't valid in parameter position.
635+
636+
#[cfg(before_api = "4.4")]
637+
#[doc(hidden)]
638+
fn __virtual_call(name: &str) -> sys::GDExtensionClassCallVirtual;
639+
640+
#[cfg(since_api = "4.4")]
633641
#[doc(hidden)]
634-
fn __virtual_call(
635-
name: &str,
636-
#[cfg(since_api = "4.4")] hash: u32,
637-
) -> sys::GDExtensionClassCallVirtual;
642+
fn __virtual_call(name: &str, hash: u32) -> sys::GDExtensionClassCallVirtual;
638643
}
639644
}

godot-ffi/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ api-4-2 = ["godot-bindings/api-4-2"]
3030
api-4-2-1 = ["godot-bindings/api-4-2-1"]
3131
api-4-2-2 = ["godot-bindings/api-4-2-2"]
3232
api-4-3 = ["godot-bindings/api-4-3"]
33+
api-4-4 = ["godot-bindings/api-4-4"]
3334
# ]]
3435

3536
# TODO: get rid of paste and gensym, they are trivially implementable with proc-macros. Update cargo-deny.

godot/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ api-4-2 = ["godot-core/api-4-2"]
3838
api-4-2-1 = ["godot-core/api-4-2-1"]
3939
api-4-2-2 = ["godot-core/api-4-2-2"]
4040
api-4-3 = ["godot-core/api-4-3"]
41+
api-4-4 = ["godot-core/api-4-4"]
4142
# ]]
4243

4344
default = ["__codegen-full"]

itest/repo-tweak/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ pub const GODOT_LATEST_PATCH_VERSIONS: &[&str] = &[
2121
"4.1.4",
2222
"4.2.2",
2323
"4.3.0",
24-
"4.4.0", // Upcoming.
24+
"4.4.0",
25+
"4.5.0", // Upcoming.
2526
];
2627

2728
// ----------------------------------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)