Skip to content

Commit a815aff

Browse files
authored
Merge pull request #1184 from godot-rust/qol/prepare-v0.3
Improve signal/async docs; MSRV 1.85 -> 1.87
2 parents d18785d + f02fba7 commit a815aff

File tree

25 files changed

+308
-99
lines changed

25 files changed

+308
-99
lines changed

.github/workflows/full-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145

146146
- name: linux
147147
os: ubuntu-22.04
148-
rust-toolchain: "1.85"
148+
rust-toolchain: "1.87"
149149
rust-special: -msrv
150150

151151
steps:

.github/workflows/update-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919

2020
env:
2121
# Keep this a variable for easy search&replace.
22-
MSRV: 1.85
22+
MSRV: 1.87
2323

2424
jobs:
2525
notify-docs:

Changelog.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,116 @@ Cutting-edge API docs of the `master` branch are available [here](https://godot-
1010

1111
## Quick navigation
1212

13+
- [v0.3.0](#v030)
1314
- [v0.2.0](#v020), [v0.2.1](#v021), [v0.2.2](#v022), [v0.2.3](#v023), [v0.2.4](#v024)
1415
- [v0.1.1](#v011), [v0.1.2](#v012), [v0.1.3](#v013)
1516

1617

18+
## [v0.3.0](https://docs.rs/godot/0.3.0)
19+
20+
_31 May 2025_
21+
22+
See [devlog article](https://godot-rust.github.io/dev/may-2025-update) for highlights.
23+
24+
### 🌻 Features
25+
26+
- Godot 4.4 support ([#1065](https://github.com/godot-rust/gdext/pull/1065))
27+
- Type-safe signals
28+
- 🌊 User-defined signals ([#1000](https://github.com/godot-rust/gdext/pull/1000))
29+
- Explicit signal visibility ([#1075](https://github.com/godot-rust/gdext/pull/1075))
30+
- Type-safe signals for engine classes ([#1111](https://github.com/godot-rust/gdext/pull/1111))
31+
- Inherited typed signals ([#1134](https://github.com/godot-rust/gdext/pull/1134))
32+
- `emit()` now available on inherited symbols + smaller cleanups ([#1135](https://github.com/godot-rust/gdext/pull/1135))
33+
- User classes expose typed-signal API even without `#[signal]` ([#1146](https://github.com/godot-rust/gdext/pull/1146))
34+
- Generated `emit()` functions now take `impl AsArg<T>` ([#1150](https://github.com/godot-rust/gdext/pull/1150))
35+
- Simplify `connect*` usage ([#1152](https://github.com/godot-rust/gdext/pull/1152))
36+
- Clean up `ConnectBuilder` and some other signal APIs ([#1171](https://github.com/godot-rust/gdext/pull/1171))
37+
- `ConnectBuilder::connect_*_gd()` takes `Gd` instead of `&mut Gd` ([#1175](https://github.com/godot-rust/gdext/pull/1175))
38+
- Replace macro approach with indirect trait ([#1179](https://github.com/godot-rust/gdext/pull/1179))
39+
- Async/await
40+
- Async Signals ([#1043](https://github.com/godot-rust/gdext/pull/1043))
41+
- Allow `Gd<T>` to be passed as a parameter in async signals ([#1091](https://github.com/godot-rust/gdext/pull/1091))
42+
- Prevent `signal_future_send_arg_no_panic` test from panicking ([#1137](https://github.com/godot-rust/gdext/pull/1137))
43+
- Itest runner must call `on_finished` deferred ([#1095](https://github.com/godot-rust/gdext/pull/1095))
44+
- Impl `DynamicSend` for `Array<T>` ([#1122](https://github.com/godot-rust/gdext/pull/1122))
45+
- Registration
46+
- 🌊 Add `OnEditor<T>`, remove `impl<T> Export for Gd<T>` and `DynGd<T, D>` ([#1051](https://github.com/godot-rust/gdext/pull/1051), [#1079](https://github.com/godot-rust/gdext/pull/1079))
47+
- Add `OnReady::from_loaded()` + `#[init(load = "PATH")]` ([#1083](https://github.com/godot-rust/gdext/pull/1083))
48+
- Add support for `@experimental` and `@deprecated` attributes for user-generated docs ([#1114](https://github.com/godot-rust/gdext/pull/1114))
49+
- Builtin types
50+
- Callables to builtin methods; `Array::bsearch_by, sort_unstable_by` ([#1064](https://github.com/godot-rust/gdext/pull/1064))
51+
- `GString`, `StringName`: add conversions from bytes and C-strings ([#1062](https://github.com/godot-rust/gdext/pull/1062))
52+
- `Array`, `Dictionary`: add `into_read_only()` + `is_read_only()` ([#1096](https://github.com/godot-rust/gdext/pull/1096))
53+
- Interface traits
54+
- Virtual methods can become optional/required/removed in derived classes ([#1136](https://github.com/godot-rust/gdext/pull/1136))
55+
- 🌊 Final and non-instantiable classes ([#1162](https://github.com/godot-rust/gdext/pull/1162))
56+
- 🌊 Final classes no longer have a `I*` interface trait ([#1182](https://github.com/godot-rust/gdext/pull/1182))
57+
- Support `f32` directly in `process` and `physics_process` ([#1110](https://github.com/godot-rust/gdext/pull/1110))
58+
59+
### 📈 Performance
60+
61+
- Reduce number of classes in minimal codegen ([#1099](https://github.com/godot-rust/gdext/pull/1099))
62+
- Decrease `CallError` size from 176 to 8 bytes ([#1167](https://github.com/godot-rust/gdext/pull/1167))
63+
64+
### 🧹 Quality of life
65+
66+
- Usability
67+
- Propagate panics in object constructors to `Gd::from_init_fn()`, `new_gd()`, `new_alloc()` ([#1140](https://github.com/godot-rust/gdext/pull/1140))
68+
- 🌊 Correct `ConnectFlags` classification (enum -> bitfield) ([#1002](https://github.com/godot-rust/gdext/pull/1002))
69+
- Bitfields now have `|=` operator ([#1097](https://github.com/godot-rust/gdext/pull/1097))
70+
- Panic handling: thread safety; set hook once and not repeatedly ([#1037](https://github.com/godot-rust/gdext/pull/1037))
71+
- Add diagnostic hints for missing `ToGodot`/`FromGodot` traits ([#1084](https://github.com/godot-rust/gdext/pull/1084))
72+
- `bind/bind_mut` borrow errors now print previous stacktrace ([#1094](https://github.com/godot-rust/gdext/pull/1094))
73+
- Make CollisionShapes `...debug_color` methods available in Release builds ([#1149](https://github.com/godot-rust/gdext/pull/1149))
74+
- 🌊 Add `_rawptr` suffix to all unsafe virtual functions ([#1174](https://github.com/godot-rust/gdext/pull/1174))
75+
- 🌊 Remove deprecated symbols for v0.3 ([#1160](https://github.com/godot-rust/gdext/pull/1160))
76+
- Refactoring
77+
- Experiment with splitting up signature differently ([#1042](https://github.com/godot-rust/gdext/pull/1042))
78+
- XML doc generation: code cleanup ([#1077](https://github.com/godot-rust/gdext/pull/1077))
79+
- `GodotFfi::variant_type` can be constant ([#1090](https://github.com/godot-rust/gdext/pull/1090))
80+
- Refactor parsing of `#[godot_api]` inner attributes ([#1154](https://github.com/godot-rust/gdext/pull/1154))
81+
- Adjust test to account for `Node::set_name()` change (`String` -> `StringName`) ([#1153](https://github.com/godot-rust/gdext/pull/1153))
82+
- Dependencies, project structure, tooling
83+
- Move examples out of repository ([#1085](https://github.com/godot-rust/gdext/pull/1085))
84+
- Remove paste, simplify plugin macros ([#1069](https://github.com/godot-rust/gdext/pull/1069))
85+
- 🌊 Bump MSRV from 1.80 to 1.87 ([#1076](https://github.com/godot-rust/gdext/pull/1076), [#1184](https://github.com/godot-rust/gdext/pull/1184))
86+
- Validate that `api-custom` is run for Godot Debug binary ([#1071](https://github.com/godot-rust/gdext/pull/1071))
87+
- Centralize + update dependencies in workspace `Cargo.toml` ([#1127](https://github.com/godot-rust/gdext/pull/1127))
88+
- 🌊 Reduce number of classes in minimal codegen ([#1099](https://github.com/godot-rust/gdext/pull/1099))
89+
- Post `Rust 1.86` update: apply clippy lints ([#1115](https://github.com/godot-rust/gdext/pull/1115))
90+
- Move `itest` default feature `codegen-full` into build script ([#1100](https://github.com/godot-rust/gdext/pull/1100))
91+
92+
### 🛠️ Bugfixes
93+
94+
- WebAssembly
95+
- Wasm threading fixes ([#1093](https://github.com/godot-rust/gdext/pull/1093))
96+
- Remove `gensym`, fix Wasm class registration ([#1092](https://github.com/godot-rust/gdext/pull/1092))
97+
- Undo Wasm threading fix on panic context tracking ([#1107](https://github.com/godot-rust/gdext/pull/1107))
98+
- Editor integration
99+
- Fix editor docs not generating when class itself is undocumented ([#1089](https://github.com/godot-rust/gdext/pull/1089))
100+
- Fix crash related to adding `EditorPlugin` to the editor before all the classes are registered ([#1138](https://github.com/godot-rust/gdext/pull/1138))
101+
- Misc
102+
- 🌊 `Callable::from_local_static()` now requires Godot 4.4+ ([#1029](https://github.com/godot-rust/gdext/pull/1029))
103+
- Masked enums can now be constructed from integers ([#1106](https://github.com/godot-rust/gdext/pull/1106))
104+
- Properly set `GDExtensionBool` is_valid to true in `to_string` function ([#1145](https://github.com/godot-rust/gdext/pull/1145))
105+
- Virtual dispatch: fix incorrect matching of renamed methods ([#1173](https://github.com/godot-rust/gdext/pull/1173))
106+
- Tooling workarounds
107+
- Release job in minimal CI; temporarily work around Godot blocker ([#1143](https://github.com/godot-rust/gdext/pull/1143))
108+
- Work around `OpenXR*` APIs wrongly exposed in release; wider release checks in CI ([#1070](https://github.com/godot-rust/gdext/pull/1070))
109+
- Work around `ResourceDeepDuplicateMode` wrongly marked as an global enum in `extension_api.json` ([#1180](https://github.com/godot-rust/gdext/pull/1180))
110+
111+
### 📚 Documentation
112+
113+
- Move builtin API design to `__docs` module ([#1063](https://github.com/godot-rust/gdext/pull/1063))
114+
- Regression test for checking if `RustCallable` is connected to signal ([#1068](https://github.com/godot-rust/gdext/pull/1068))
115+
- Describe semantics of `base_mut()` in docs ([#1103](https://github.com/godot-rust/gdext/pull/1103))
116+
- Document `DynGd<_, D>` type inference ([#1142](https://github.com/godot-rust/gdext/pull/1142))
117+
- `#[derive(GodotClass)]`, `#[godot_api]` docs: replace table of contents with sidebar ([#1155](https://github.com/godot-rust/gdext/pull/1155))
118+
- Add `rustc-args` to `package.metadata.docs.rs` ([#1169](https://github.com/godot-rust/gdext/pull/1169))
119+
- Document runtime class in editor requirement ([#1168](https://github.com/godot-rust/gdext/pull/1168))
120+
- Improve signal/async docs ([#1184](https://github.com/godot-rust/gdext/pull/1184))
121+
122+
17123
## [v0.2.4](https://docs.rs/godot/0.2.4)
18124

19125
_24 February 2025_

godot-bindings/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "godot-bindings"
33
version = "0.2.4"
44
edition = "2021"
5-
rust-version = "1.85"
5+
rust-version = "1.87"
66
license = "MPL-2.0"
77
keywords = ["gamedev", "godot", "engine", "ffi", "sys"]
88
categories = ["game-engines", "graphics"]

godot-cell/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "godot-cell"
33
version = "0.2.4"
44
edition = "2021"
5-
rust-version = "1.85"
5+
rust-version = "1.87"
66
license = "MPL-2.0"
77
keywords = ["gamedev", "godot", "engine", "ffi"]
88
categories = ["game-engines", "graphics"]

godot-codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "godot-codegen"
33
version = "0.2.4"
44
edition = "2021"
5-
rust-version = "1.85"
5+
rust-version = "1.87"
66
license = "MPL-2.0"
77
keywords = ["gamedev", "godot", "engine", "codegen"]
88
categories = ["game-engines", "graphics"]

godot-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "godot-core"
33
version = "0.2.4"
44
edition = "2021"
5-
rust-version = "1.85"
5+
rust-version = "1.87"
66
license = "MPL-2.0"
77
keywords = ["gamedev", "godot", "engine", "2d", "3d"] # possibly: "ffi"
88
categories = ["game-engines", "graphics"]

godot-core/src/builtin/collections/packed_array.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ macro_rules! impl_packed_array {
5858
$($trait_impls:tt)*
5959
},
6060
) => {
61-
#[doc = concat!("Implements Godot's `", stringify!($PackedArray), "` type,")]
62-
#[doc = concat!("which is a space-efficient array of `", stringify!($Element), "`s.")]
61+
#[doc = concat!("Space-efficient array of [`", stringify!($Element), "`] elements.")]
6362
///
6463
/// Check out the [book](https://godot-rust.github.io/book/godot-api/builtins.html#packed-arrays) for a tutorial on packed arrays.
6564
///

godot-core/src/builtin/real.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ macro_rules! real {
196196
}};
197197
}
198198

199-
/// Array of reals.
199+
/// Array of [`real`]s.
200200
///
201201
/// The expression has type `[real; N]` where `N` is the number of elements in the array.
202202
///

godot-core/src/builtin/signal.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ use crate::obj::bounds::DynMemory;
1919
use crate::obj::{Bounds, Gd, GodotClass, InstanceId};
2020
use sys::{ffi_methods, GodotFfi};
2121

22-
/// A `Signal` represents a signal of an Object instance in Godot.
22+
/// Untyped Godot signal.
2323
///
24-
/// Signals are composed of a reference to an `Object` and the name of the signal on this object.
24+
/// Signals are composed of a pointer to an `Object` and the name of the signal on this object.
2525
///
26-
/// # Godot docs
26+
/// In Rust, you might want to work with type-safe signals, available under the [`TypedSignal`](crate::registry::signal::TypedSignal) struct.
2727
///
28+
/// # Godot docs
2829
/// [`Signal` (stable)](https://docs.godotengine.org/en/stable/classes/class_signal.html)
2930
pub struct Signal {
3031
opaque: sys::types::OpaqueSignal,
@@ -75,7 +76,7 @@ impl Signal {
7576
/// A signal can only be connected once to the same [`Callable`]. If the signal is already connected,
7677
/// returns [`Error::ERR_INVALID_PARAMETER`] and
7778
/// pushes an error message, unless the signal is connected with [`ConnectFlags::REFERENCE_COUNTED`](crate::classes::object::ConnectFlags::REFERENCE_COUNTED).
78-
/// To prevent this, use [`Self::is_connected`] first to check for existing connections.
79+
/// To prevent this, check for existing connections with [`is_connected()`][Self::is_connected].
7980
pub fn connect(&self, callable: &Callable, flags: i64) -> Error {
8081
let error = self.as_inner().connect(callable, flags);
8182

@@ -84,7 +85,7 @@ impl Signal {
8485

8586
/// Disconnects this signal from the specified [`Callable`].
8687
///
87-
/// If the connection does not exist, generates an error. Use [`Self::is_connected`] to make sure that the connection exists.
88+
/// If the connection does not exist, generates an error. Use [`is_connected()`](Self::is_connected) to make sure that the connection exists.
8889
pub fn disconnect(&self, callable: &Callable) {
8990
self.as_inner().disconnect(callable);
9091
}

0 commit comments

Comments
 (0)