Skip to content

Commit 12238fb

Browse files
committed
Devlog: 2024 review
1 parent 7f66319 commit 12238fb

File tree

2 files changed

+147
-1
lines changed

2 files changed

+147
-1
lines changed

website/content/dev/2024-06-24-june-2024-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Now that a lot of the tooling aspects around godot-rust publishing are taken car
164164
[#751]: https://github.com/godot-rust/gdext/pull/751
165165
[#761]: https://github.com/godot-rust/gdext/pull/761
166166
[book-select-version]: https://godot-rust.github.io/book/toolchain/godot-version.html
167-
[dev-update-2023]: 2023-12-31-godot-rust-2023-review.md
167+
[dev-update-2023]: ../godot-rust-2023-review
168168
[issues]: https://github.com/godot-rust/gdext/issues
169169
[pull-requests]: https://github.com/godot-rust/gdext/pulls?q=is%3Apr+is%3Amerged
170170
[rust-on-unimplemented]: https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#diagnostic-attributes
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
+++
2+
# Copyright (c) godot-rust; Bromeon and contributors.
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
6+
7+
title = "2024: A new crate joins the Rust gamedev ecosystem"
8+
authors = ["Bromeon"]
9+
10+
[extra]
11+
summary = "A retrospective on godot-rust in the year 2024."
12+
tags = ["retrospective", "dev-update", "2024"]
13+
+++
14+
15+
2024 marks the year where **godot-rust** became accessible to a wide range of users. On one hand, this was possible due to our [release on crates.io][godot-rust-crate], on the other, a lot of people started to build projects around godot-rust. Last, several crucial improvements in the library itself significantly lowered the entry burden, and many more are planned.
16+
17+
Last year, we had a similar post [summarizing the achievements of the year 2023][dev-update-2023], which went into lots of technical details. Since we now have more regular devlog entries -- like the [major update last month][dev-november] -- this post will be rather high-level.
18+
19+
20+
## Easy crate setup
21+
22+
As mentioned, an important milestone was the crates.io release in June 2024. In the meantime, 6 versions have been released! The published crate has the advantage to be more explicit regarding compatibility with SemVer, and allow deterministic builds.
23+
24+
In our case, there's the additional dimension of _Godot version_ which needs to be taken into account. While games may target the latest engine release, editor plugins can reach a wider target audience if they're compatible with older releases. For godot-rust, a crate feature like `api-4-1` makes this very easy to configure.
25+
26+
27+
28+
## Library highlights
29+
30+
On the technical side, a huge amount of improvements have landed in 2024. This article is too big to cover all the details, but the following places provide a very good overview:
31+
32+
- [June 2024 update][dev-june]
33+
- [November 2024 update][dev-november]
34+
- [GitHub Changelog][godot-rust-changelog]
35+
36+
The initial crate release came with a big cleanup of the module structure -- some symbols were all over the place. Now, modules follow Godot's own categorization much more closely: `global` (global-scope enums and functions), `builtin` (built-in types), `classes` (classes) or `register` for user-registered types, etc.
37+
38+
**Script instances** have been fleshed out a lot. Those allow Rust code to be used as scripts that can be attached to nodes, like GDScript or C#. While there is still work to do, a lot of the foundations are laid out, which even made it possible [for third-party libraries][godot-rust-script] to build on this. Special shout-out to TitanNano for doing the majority of the work in this domain.
39+
40+
**Ergonomic argument passing** streamlined the way how arguments are passed to Godot APIs. Instead of `add_child(&scene.clone().upcast())` or `set_name("name".into())`, you can now use `add_child(&node)` and `set_name("name")`.
41+
42+
On the proc-macro side, there is `#[init(node = "path/to/Node")]`, which allows to directly initialize nodes type-safely with a given path. The attribute `#[rpc]` mimics Godot's `@rpc` configuration.
43+
44+
**Editor docs** allow Rust-defined classes to expose documentation, which can be looked up in the editor browser. RustDoc Markdown code is automatically converted to Godot's own docs format.
45+
46+
Several hot paths have been optimized (pass-by-ref, cached object pointers, `ClassName` simplification, panic hooks). Also, investigations have shown that there's quite a bit of room for further performance improvements, especially in Release mode. Special thanks to Dragos (Ughuu) for pushing the limits here.
47+
48+
49+
## Built-in APIs
50+
51+
Built-in types have been neglected for quite a while, which is especially sad given their central role in Godot. Exactly two weeks ago, a handful of people from the godot-rust community sat together in a mini-hackaton, with the goal to bring built-ins up to speed with Godot.
52+
53+
Several hours of effort resulted in an incredible outcome -- the following types now have feature parity with their Godot equivalents:
54+
55+
- `Vector2i` ([#978](https://github.com/godot-rust/gdext/pull/978))
56+
- `Projection` ([#983](https://github.com/godot-rust/gdext/pull/983))
57+
- `Callable` ([#979](https://github.com/godot-rust/gdext/pull/979))
58+
- `Quaternion` ([#981](https://github.com/godot-rust/gdext/pull/981))
59+
- `GString` ([#980](https://github.com/godot-rust/gdext/pull/980))
60+
- `StringName` ([#980](https://github.com/godot-rust/gdext/pull/980))
61+
- `NodePath` ([#982](https://github.com/godot-rust/gdext/pull/982))
62+
- `PackedByteArray` ([#994](https://github.com/godot-rust/gdext/pull/994))
63+
64+
Much appreciation for the participants fpdotmonkey, sylbeth and lilizoey!
65+
66+
Just today, we released crate version [0.2.2][godot-rust-crate], which brings all these improvements to crates.io.
67+
68+
69+
## Ecosystem
70+
71+
The crate release had another effect. While skimming the Discord server, I noticed that a tremendous number of user projects has been built around godot-rust in the meantime, many of them actively developed. Ranging from games to extension libraries, editor plugins and other integrations, there is a **huge** amount of creativity bundled in a relatively small community.
72+
73+
To make sure these efforts don't go to waste, there is now an [Ecosystem page in the book][book-ecosystem]. This is an early version, and I'm sure I've missed a few. But it should help users discover other projects, and is intended to be updated over time!
74+
75+
To give a random sample of 3rd-party projects, some WIP and some production-ready:
76+
77+
- Not one, but _two_ integrations with Rapier physics
78+
- Coroutine support that allows GDScript-style `yield`
79+
- Unit tests for godot-rust projects
80+
- A game boy emulator for Godot, written in Rust
81+
- A transpiler from GDScript to Rust
82+
- Sandboxing for Rust code
83+
84+
This should give you enough reasons to check out that page!
85+
86+
87+
## Outlook
88+
89+
One year ago, we set the following goals:
90+
91+
* [Re-entrant calls for object references][#501].
92+
* [Publish to crates.io.][#2]
93+
* [Better threading support.][#18]
94+
* [Builder API for registration.][#4]
95+
* Initial support for [Android][#470] and [iOS][#498].
96+
97+
Re-entrant calls and crates.io have definitely been achieved. Android/iOS has seen multiple users in the meantime, so they're in a usable state, however documentation and CI could get some more love. Threading unfortunately proved much harder than anticipated, but at least 2024 has brought some great proposals to light, which we hopefully can tackle soon. For Builder API, we overestimated how much of a priority it would be -- it looks like most users are happy with the proc-macro one, and many ask for more macro features.
98+
99+
On the other hand, multiple achievements weren't originally planned and are mentioned in above's _Library highlights_ section. For next year, some
100+
important breakthroughs would be:
101+
102+
* **A threading model** (still) -- we should probably not aim for the perfect one, but rather a decent, pragmatic API that allows to get things done.
103+
* **WebAssembly** -- while in a working state, Wasm presents quite a high bar for newcomers. Documentation, CI and tools to assist setup would help here.
104+
* **Setup tools** -- speaking of which, configuring godot-rust projects has come up a few times. Some automation would relieve users from mundane tasks and give them more time to build great games. Examples are creating a fresh project template, syncing `.gdextension` or `.cargo/config.toml` files.
105+
* **Signals** -- one of the last big bastions in terms of ergonomics. Making `#[signal]` more useful will empower users to work with signals in a way that's on par, or -- in case of type-safety -- even beyond GDScript.
106+
107+
108+
### GitHub stats
109+
110+
Compared to last year, here are again some stats for the [GitHub project][godot-rust-github]:
111+
112+
| Statistic | 2023 | 2024 |
113+
|------------------------------|-------|-------|
114+
| Commits | 1,239 | 2,137 |
115+
| Contributors | 55 | 83 |
116+
| Stars | 2,050 | 3,255 |
117+
| Forks | 131 | 212 |
118+
| Issues Closed (as Completed) | 139 | 266 |
119+
| Issues Open | 91 | 95 |
120+
| Pull Requests Merged | 262 | 517 |
121+
| Pull Requests Open | 2 | 5 |
122+
123+
Overall, there's a steady, healthy growth to the project -- but one metric seems particularly interesting (and surprising).
124+
The number of open issues has barely increased, despite godot-rust now being used in many more projects!
125+
126+
It seems that tackling the challenges is definitely feasible, which gives a very optimistic outlook into the new year!
127+
128+
This has only been possible thanks to the relentless efforts of the amazing community, be it helping other users, contributing to the library or simply building great things. Massive thanks to everyone being a part in the journey.
129+
130+
**A Happy New Year and great start into 2025!**
131+
132+
133+
[#18]: https://github.com/godot-rust/gdext/issues/18
134+
[#2]: https://github.com/godot-rust/gdext/issues/2
135+
[#470]: https://github.com/godot-rust/gdext/issues/470
136+
[#498]: https://github.com/godot-rust/gdext/issues/498
137+
[#4]: https://github.com/godot-rust/gdext/issues/4
138+
[#501]: https://github.com/godot-rust/gdext/pull/501
139+
[book-ecosystem]: https://godot-rust.github.io/book/ecosystem
140+
[dev-june]: ../june-2024-update
141+
[dev-november]: ../november-2024-update
142+
[dev-update-2023]: ../godot-rust-2023-review
143+
[godot-rust-changelog]: https://github.com/godot-rust/gdext/blob/master/Changelog.md
144+
[godot-rust-crate]: https://crates.io/crates/godot
145+
[godot-rust-github]: https://github.com/godot-rust/gdext
146+
[godot-rust-script]: https://github.com/titannano/godot-rust-script

0 commit comments

Comments
 (0)