Skip to content

Commit

Permalink
Enable api-4-3 feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Aug 16, 2024
1 parent bd24581 commit 99dd3ab
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions godot-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ api-4-1-4 = []
api-4-2 = []
api-4-2-1 = []
api-4-2-2 = []
api-4-3 = []
# ]]

default = []
Expand Down
1 change: 1 addition & 0 deletions godot-bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fn main() {
if cfg!(feature = "api-4-2") { count += 1; }
if cfg!(feature = "api-4-2-1") { count += 1; }
if cfg!(feature = "api-4-2-2") { count += 1; }
if cfg!(feature = "api-4-3") { count += 1; }
// ]]

assert!(count <= 1, "ERROR: at most one `api-*` feature can be enabled");
Expand Down
7 changes: 6 additions & 1 deletion godot-bindings/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub const ALL_VERSIONS: &[(u8, u8, u8)] = &[
(4, 2, 1),
(4, 2, 2),
(4, 3, 0),
(4, 4, 0),
// ]]
];

Expand Down Expand Up @@ -53,6 +54,9 @@ pub use gdextension_api::version_4_2_1 as prebuilt;
#[cfg(feature = "api-4-2-2")]
pub use gdextension_api::version_4_2_2 as prebuilt;

#[cfg(feature = "api-4-3")]
pub use gdextension_api::version_4_3 as prebuilt;

// ]]

// If none of the api-* features are provided, use default prebuilt version (typically latest Godot stable release).
Expand All @@ -70,12 +74,13 @@ pub use gdextension_api::version_4_2_2 as prebuilt;
feature = "api-4-2",
feature = "api-4-2-1",
feature = "api-4-2-2",
feature = "api-4-3",
feature = "api-custom",
)))]
// ]]

// [version-sync] [[
// [include] current.minor
// [line] pub use gdextension_api::version_$snakeVersion as prebuilt;
pub use gdextension_api::version_4_2 as prebuilt;
pub use gdextension_api::version_4_3 as prebuilt;
// ]]
1 change: 1 addition & 0 deletions godot-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ api-4-1-4 = ["godot-ffi/api-4-1-4"]
api-4-2 = ["godot-ffi/api-4-2"]
api-4-2-1 = ["godot-ffi/api-4-2-1"]
api-4-2-2 = ["godot-ffi/api-4-2-2"]
api-4-3 = ["godot-ffi/api-4-3"]
# ]]

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions godot-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ api-4-1-4 = ["godot-bindings/api-4-1-4"]
api-4-2 = ["godot-bindings/api-4-2"]
api-4-2-1 = ["godot-bindings/api-4-2-1"]
api-4-2-2 = ["godot-bindings/api-4-2-2"]
api-4-3 = ["godot-bindings/api-4-3"]
# ]]

# TODO: get rid of paste and gensym, they are trivially implementable with proc-macros. Update cargo-deny.
Expand Down
1 change: 1 addition & 0 deletions godot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ api-4-1-4 = ["godot-core/api-4-1-4"]
api-4-2 = ["godot-core/api-4-2"]
api-4-2-1 = ["godot-core/api-4-2-1"]
api-4-2-2 = ["godot-core/api-4-2-2"]
api-4-3 = ["godot-core/api-4-3"]
# ]]

default = ["__codegen-full"]
Expand Down
1 change: 1 addition & 0 deletions itest/repo-tweak/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub const GODOT_LATEST_PATCH_VERSIONS: &[&str] = &[
"4.1.4",
"4.2.2",
"4.3.0",
"4.4.0", // Upcoming.
];

// ----------------------------------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 99dd3ab

Please sign in to comment.