Skip to content

Commit 6d9bc20

Browse files
bors[bot]toasteater
and
toasteater
authored
Merge #683
683: Prepare release 0.9.2 r=toasteater a=toasteater This is a minor release focusing on improving documentation and rounding out rough edges of the API. - Bumped all version numbers to 0.9.2 - Bumped dependencies to latest versions. - Updated CHANGELOG. Co-authored-by: toasteater <[email protected]>
2 parents 9c7c8da + 6fda215 commit 6d9bc20

File tree

11 files changed

+60
-26
lines changed

11 files changed

+60
-26
lines changed

CHANGELOG.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,46 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [0.9.2] - 2020-02-01
9+
10+
### Added
11+
12+
- Added `Instance::emplace`, a constructor that moves an existing script struct onto a new object.
13+
14+
- Added `Ref::by_class_name`, a method to construct Godot objects from class names.
15+
16+
- Added methods to recover `Ref`s or `TRef`s from instance IDs.
17+
18+
- Added a `Default` implementation for `NodePath`.
19+
20+
- Added `Add`, `AddAssign`, `Ord`, `PartialOrd`, `Index` implementations for `GodotString`.
21+
22+
- Added convenience methods for getting typed nodes in `gdnative-bindings`.
23+
24+
- Added examples for custom node plugins and Godot networking.
25+
26+
- Added the `#[property(no_editor)]` flag, which exports properties that can be accessed from other languages like GDScript, but aren't shown in the editor.
927

1028
### Changed
1129

1230
- **The minimum compatible engine version is now 3.2-stable.**
1331

32+
- Improved readability of generated documentation for the API methods.
33+
34+
- Improved error messages for failed method calls.
35+
36+
- Proc-macros now emit compile errors rather than panic, improving the development experience.
37+
38+
- Documented the trade-offs of using `GodotString` vs. the `std` `String` type.
39+
40+
### Fixed
41+
42+
- `Object::callv` is now correctly marked as `unsafe`.
43+
44+
- Derive macro for `FromVariant` now correctly uses the actual variant name when reporting errors for enums.
45+
46+
- Derive macro for `OwnerToVariant` now correctly takes ownership of `self`.
47+
1448
## [0.9.1] - 2020-10-19
1549

1650
### Added

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Rust bindings to the [Godot game engine](http://godotengine.org/).
88

99
**[Website](https://godot-rust.github.io/)** |
10-
**[User Guide](https://godot-rust.github.io/book/)** | **[API Documentation](https://docs.rs/gdnative/0.9.1/gdnative/)**
10+
**[User Guide](https://godot-rust.github.io/book/)** | **[API Documentation](https://docs.rs/gdnative/0.9.2/gdnative/)**
1111

1212
## Stability
1313

@@ -35,7 +35,7 @@ After `bindgen` dependencies are installed, add the `gdnative` crate as a depend
3535

3636
```toml
3737
[dependencies]
38-
gdnative = "0.9.1"
38+
gdnative = "0.9.2"
3939

4040
[lib]
4141
crate-type = ["cdylib"]

bindings_generator/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ documentation = "https://docs.rs/crate/gdnative_bindings_generator"
66
repository = "https://github.com/godot-rust/godot-rust"
77
homepage = "https://godot-rust.github.io/"
88
license = "MIT"
9-
version = "0.9.1"
9+
version = "0.9.2"
1010
workspace = ".."
1111
edition = "2018"
1212

@@ -15,7 +15,7 @@ debug = []
1515

1616
[dependencies]
1717
heck = "0.3.0"
18-
roxmltree = "0.13.0"
18+
roxmltree = "0.14.0"
1919
proc-macro2 = "1.0.6"
2020
quote = "1.0.2"
2121
syn = { version = "1.0", features = ["full", "extra-traits", "visit"] }

examples/dodge_the_creeps/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ crate-type = ["cdylib"]
1010

1111
[dependencies]
1212
gdnative = { path = "../../gdnative" }
13-
rand = "0.7.3"
13+
rand = "0.8.3"

examples/dodge_the_creeps/src/main_scene.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ impl Main {
9595
let mob_scene: Ref<RigidBody2D, _> = instance_scene(&self.mob);
9696

9797
let mut rng = rand::thread_rng();
98-
let offset = rng.gen_range(std::u32::MIN, std::u32::MAX);
98+
let offset = rng.gen_range(std::u32::MIN..std::u32::MAX);
9999

100100
mob_spawn_location.set_offset(offset.into());
101101

102102
let mut direction = mob_spawn_location.rotation() + PI / 2.0;
103103

104104
mob_scene.set_position(mob_spawn_location.position());
105105

106-
direction += rng.gen_range(-PI / 4.0, PI / 4.0);
106+
direction += rng.gen_range(-PI / 4.0..PI / 4.0);
107107
mob_scene.set_rotation(direction);
108108
let d = direction as f32;
109109

@@ -114,7 +114,7 @@ impl Main {
114114

115115
mob.map(|x, mob_owner| {
116116
mob_owner
117-
.set_linear_velocity(Vector2::new(rng.gen_range(x.min_speed, x.max_speed), 0.0));
117+
.set_linear_velocity(Vector2::new(rng.gen_range(x.min_speed..x.max_speed), 0.0));
118118

119119
mob_owner
120120
.set_linear_velocity(mob_owner.linear_velocity().rotated(Angle { radians: d }));

gdnative-bindings/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "The Godot game engine's automatcally generated bindings to Godot
55
documentation = "https://docs.rs/crate/gdnative-bindings"
66
repository = "https://github.com/godot-rust/godot-rust"
77
homepage = "https://godot-rust.github.io/"
8-
version = "0.9.1"
8+
version = "0.9.2"
99
license = "MIT"
1010
workspace = ".."
1111
edition = "2018"
@@ -15,11 +15,11 @@ formatted = []
1515
one_class_one_file = []
1616

1717
[dependencies]
18-
gdnative-sys = { path = "../gdnative-sys", version = "0.9.1" }
19-
gdnative-core = { path = "../gdnative-core", version = "=0.9.1" }
18+
gdnative-sys = { path = "../gdnative-sys", version = "0.9.2" }
19+
gdnative-core = { path = "../gdnative-core", version = "=0.9.2" }
2020
libc = "0.2"
2121
bitflags = "1.2"
2222

2323
[build-dependencies]
2424
heck = "0.3.0"
25-
gdnative_bindings_generator = { path = "../bindings_generator", version = "=0.9.1" }
25+
gdnative_bindings_generator = { path = "../bindings_generator", version = "=0.9.2" }

gdnative-core/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "The Godot game engine's gdnative core bindings."
55
documentation = "https://docs.rs/crate/gdnative-core"
66
repository = "https://github.com/godot-rust/godot-rust"
77
homepage = "https://godot-rust.github.io/"
8-
version = "0.9.1"
8+
version = "0.9.2"
99
license = "MIT"
1010
workspace = ".."
1111
edition = "2018"
@@ -17,14 +17,14 @@ nativescript = ["bitflags", "parking_lot"]
1717
type_tag_fallback = []
1818

1919
[dependencies]
20-
gdnative-sys = { path = "../gdnative-sys", version = "0.9.1" }
20+
gdnative-sys = { path = "../gdnative-sys", version = "0.9.2" }
2121
libc = "0.2"
22-
approx = "0.3.2"
22+
approx = "0.4.0"
2323
euclid = "0.22.1"
2424
indexmap = "1.6.0"
25-
ahash = "0.4.5"
25+
ahash = "0.7.0"
2626

27-
gdnative-impl-proc-macros = { path = "../impl/proc_macros", version = "=0.9.1" }
27+
gdnative-impl-proc-macros = { path = "../impl/proc_macros", version = "=0.9.2" }
2828

2929
bitflags = { version = "1.2", optional = true }
3030
parking_lot = { version = "0.11.0", optional = true }

gdnative-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "The Godot game engine's gdnative derive and procedural macros."
55
documentation = "https://docs.rs/crate/gdnative-derive"
66
repository = "https://github.com/godot-rust/godot-rust"
77
homepage = "https://godot-rust.github.io/"
8-
version = "0.9.1"
8+
version = "0.9.2"
99
license = "MIT"
1010
workspace = ".."
1111
edition = "2018"

gdnative-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Generated bindings to the Godot game engine's gdnative core types
55
documentation = "https://docs.rs/crate/gdnative-sys"
66
repository = "https://github.com/godot-rust/godot-rust"
77
homepage = "https://godot-rust.github.io/"
8-
version = "0.9.1"
8+
version = "0.9.2"
99
build = "build.rs"
1010
license = "MIT"
1111
workspace = ".."
@@ -15,7 +15,7 @@ edition = "2018"
1515
libc = "0.2"
1616

1717
[build-dependencies]
18-
bindgen = { version = "0.55.1", default-features = false, features = ["runtime"] }
18+
bindgen = { version = "0.56.0", default-features = false, features = ["runtime"] }
1919
proc-macro2 = "1.0.6"
2020
quote = "1.0.2"
2121
miniserde = "=0.1.13"

gdnative/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "The Godot game engine's gdnative bindings."
55
documentation = "https://docs.rs/crate/gdnative"
66
repository = "https://github.com/godot-rust/godot-rust"
77
homepage = "https://godot-rust.github.io/"
8-
version = "0.9.1"
8+
version = "0.9.2"
99
license = "MIT"
1010
workspace = ".."
1111
readme = "../README.md"
@@ -20,9 +20,9 @@ type_tag_fallback = ["gdnative-core/type_tag_fallback"]
2020
bindings = ["gdnative-bindings"]
2121

2222
[dependencies]
23-
gdnative-derive = { path = "../gdnative-derive", version = "=0.9.1" }
24-
gdnative-core = { path = "../gdnative-core", version = "=0.9.1" }
25-
gdnative-bindings = { optional = true, path = "../gdnative-bindings", version = "=0.9.1" }
23+
gdnative-derive = { path = "../gdnative-derive", version = "=0.9.2" }
24+
gdnative-core = { path = "../gdnative-core", version = "=0.9.2" }
25+
gdnative-bindings = { optional = true, path = "../gdnative-bindings", version = "=0.9.2" }
2626

2727
[dev-dependencies]
2828
trybuild = "1.0"

impl/proc_macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["The godot-rust developers"]
44
description = "Internal dependency of the gdnative bindings."
55
repository = "https://github.com/godot-rust/godot-rust"
66
homepage = "https://godot-rust.github.io/"
7-
version = "0.9.1"
7+
version = "0.9.2"
88
license = "MIT"
99
workspace = "../.."
1010
edition = "2018"

0 commit comments

Comments
 (0)