Skip to content

Commit

Permalink
godot-rust#396: panic for api v1.3 (Godot 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
halzy committed Jun 26, 2020
1 parent e4b464b commit 994dfab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gdnative-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,14 @@ mod api_wrapper {
eprintln!("{}", &api_json_file);
let api_root: ApiRoot = miniserde::json::from_str(&api_json_file)
.unwrap_or_else(|_| panic!("Could not parse ({:?}) into ApiRoot", from_json));

for api in api_root.all_apis() {
// Currently don't support Godot 4.0
if api.version.major == 1 && api.version.minor == 3 {
panic!("GodotEngine v4.* is not yet supported. See https://github.com/godot-rust/godot-rust/issues/396");
}
}

let struct_fields = godot_api_functions(&api_root);
let impl_constructor = api_constructor(&api_root);
let wrapper = quote! {
Expand Down

0 comments on commit 994dfab

Please sign in to comment.