Skip to content

Commit

Permalink
Raise MSRV from 1.56 to 1.63
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Sep 7, 2022
1 parent 3f4399c commit e154c82
Show file tree
Hide file tree
Showing 23 changed files with 32 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/full-ci.yml
Expand Up @@ -135,7 +135,7 @@ jobs:
- rust: { toolchain: 'nightly' }
testflags: '-- --skip ui_tests'
- os: { id: ubuntu-latest, name: linux }
rust: { toolchain: '1.56', postfix: ' (msrv 1.56)' }
rust: { toolchain: '1.63', postfix: ' (msrv 1.63)' }
testflags: '-- --skip ui_tests'
- os: { id: ubuntu-latest, name: linux }
rust: { toolchain: 'stable', postfix: ' (minimal-deps)', special: 'minimal-deps' }
Expand Down Expand Up @@ -281,9 +281,9 @@ jobs:
- rust: nightly
godot: "3.5.1-rc1"
postfix: ' (nightly)'
- rust: '1.56'
- rust: '1.63'
godot: "3.5.1-rc1"
postfix: ' (msrv 1.56)'
postfix: ' (msrv 1.63)'

# Test with oldest supported engine version
- rust: stable
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.0] - unreleased

### Changed

- Changed supported Godot version to 3.5.1 ([#910](https://github.com/godot-rust/godot-rust/pull/910))
- MSRV is now 1.63 ([#910](https://github.com/godot-rust/godot-rust/pull/910))

## [0.10.2] - unreleased

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -14,7 +14,7 @@

The bindings cover most of the exposed API of Godot 3.5, and are being used on a number of projects in development, but we still expect non-trivial breaking changes in the API in the coming releases. godot-rust adheres to [Cargo's semantic versioning](https://doc.rust-lang.org/cargo/reference/semver.html).

Minimum supported Rust version (MSRV) is **1.56**. We use the Rust 2021 Edition.
Minimum supported Rust version (MSRV) is **1.63**. We use the Rust 2021 Edition.

## Engine compatibility

Expand Down
2 changes: 1 addition & 1 deletion bindings-generator/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
version = "0.10.1"
workspace = ".."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[features]
debug = []
Expand Down
2 changes: 1 addition & 1 deletion examples/builder-export/Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "builder-export"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/dodge-the-creeps/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/native-plugin/Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "native-plugin"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/property-export/Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "property-export"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/resource/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/scene-create/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/signals/Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "signals"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/spinning-cube/Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "spinning-cube"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion gdnative-async/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ version = "0.10.1"
license = "MIT"
workspace = ".."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[features]

Expand Down
2 changes: 1 addition & 1 deletion gdnative-bindings/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ version = "0.10.1"
license = "MIT"
workspace = ".."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[features]
formatted = []
Expand Down
2 changes: 1 addition & 1 deletion gdnative-core/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ version = "0.10.1"
license = "MIT"
workspace = ".."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion gdnative-derive/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ version = "0.10.1"
license = "MIT"
workspace = ".."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion gdnative-sys/Cargo.toml
Expand Up @@ -10,7 +10,7 @@ build = "build.rs"
license = "MIT"
workspace = ".."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[dependencies]
libc = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion gdnative/Cargo.toml
Expand Up @@ -11,7 +11,7 @@ license = "MIT"
workspace = ".."
readme = "../README.md"
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[features]
# Public
Expand Down
6 changes: 3 additions & 3 deletions gdnative/src/globalscope.rs
Expand Up @@ -20,6 +20,7 @@
//! [@GDScript]: https://docs.godotengine.org/en/stable/classes/class_@gdscript.html

use crate::api::{Resource, ResourceLoader};
use crate::core_types::NodePath;
use crate::object::{memory::RefCounted, GodotObject, Ref, SubClass};

#[doc(inline)]
Expand Down Expand Up @@ -50,14 +51,13 @@ pub use gdnative_core::globalscope::*;
///
/// let scene = load::<PackedScene>("res://path/to/Main.tscn").unwrap();
/// ```
// TODO generalize parameter to `impl Into<NodePath>` once MSRV >= 1.63
#[inline]
pub fn load<T>(path: &str) -> Option<Ref<T>>
pub fn load<T>(path: impl Into<NodePath>) -> Option<Ref<T>>
where
T: SubClass<Resource> + GodotObject<Memory = RefCounted>,
{
let type_hint = T::class_name();
ResourceLoader::godot_singleton()
.load(path, type_hint, false)
.load(path.into(), type_hint, false)
.and_then(|res| res.cast::<T>())
}
2 changes: 1 addition & 1 deletion impl/proc-macros/Cargo.toml
Expand Up @@ -8,7 +8,7 @@ version = "0.10.1"
license = "MIT"
workspace = "../.."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion test/Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "gdnative-test"
version = "0.1.0"
workspace = ".."
edition = "2021"
rust-version = "1.56"
rust-version = "1.63"
license = "MIT"
publish = false

Expand Down

0 comments on commit e154c82

Please sign in to comment.