Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f575872

Browse filesBrowse files
BromeonAngelOnFira
andauthored
N28: godot-rust (rust-gamedev#854)
* N28: godot-rust * Reformatted section a bit Rebased onto 9922d8b Signed-off-by: Jan Haller <bromeon@gmail.com> * [N28: godot-rust] shorten text Co-authored-by: Forest Anderson <forestkzanderson@gmail.com>
1 parent 9922d8b commit f575872
Copy full SHA for f575872

File tree

2 files changed

+40
-0
lines changed
Filter options

2 files changed

+40
-0
lines changed
59 KB
Loading

‎content/news/028/index.md

Copy file name to clipboardExpand all lines: content/news/028/index.md
+40Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,46 @@ e.g. `Option<Entity>` will not consume additional space.
324324
[hecs]: https://github.com/Ralith/hecs
325325
[hecs-changelog]: https://github.com/Ralith/hecs/blob/master/CHANGELOG.md#071
326326

327+
### [godot-rust](https://github.com/godot-rust/godot-rust)
328+
329+
![module before/after](godot-rust-modules.png)
330+
331+
godot-rust ([GitHub][gd-github], [Discord][gd-discord], [Twitter][gd-twitter])
332+
is a Rust library that provides bindings for the Godot game engine.
333+
334+
November has been a month of refactoring for godot-rust. The API was cleaned up
335+
across different locations, reducing confusion and making the library more
336+
accessible:
337+
338+
- The module simplification ([#811][gd-811]) continued initial efforts on the
339+
module structure, such as shorter paths and avoidance of redundant re-exports.
340+
Some differences between v0.9.3 and now can be seen in the above picture.
341+
- Several core symbols were renamed for consistency ([#815][gd-815]):
342+
`RefInstance` -> `TInstance` and `TypedArray` -> `PoolArray`, among others.
343+
- Another refactoring affects the `Variant` conversion methods ([#819][gd-819]).
344+
Instead of `Variant::to_i64()` which may silently fail and return a default
345+
value (Godot behavior), the recommended method is now `Variant::to<T>()`. This
346+
enables genericity and is more idiomatic in Rust, returning an `Option` to
347+
indicate success or failure.
348+
349+
As a binding to a C++ library, one topic godot-rust has to deal with is the use
350+
of `unsafe`, which sometimes boils down to a trade-off between safety and
351+
ease-of-use. Even though Rust provides basic guidelines, there are different
352+
philosophies on their execution, see [The CXX Debate][gd-cxx] for an example.
353+
To discuss how APIs interacting with Godot can as ergonomic as possible while
354+
preserving safety, [issue #808][gd-808] was opened.
355+
356+
[gd-808]: https://github.com/godot-rust/godot-rust/pull/808
357+
[gd-811]: https://github.com/godot-rust/godot-rust/pull/811
358+
[gd-815]: https://github.com/godot-rust/godot-rust/pull/815
359+
[gd-819]: https://github.com/godot-rust/godot-rust/pull/819
360+
361+
[gd-cxx]: https://steveklabnik.com/writing/the-cxx-debate
362+
363+
[gd-github]: https://github.com/godot-rust/godot-rust
364+
[gd-discord]: https://discord.com/invite/FNudpBD
365+
[gd-twitter]: https://twitter.com/GodotRust
366+
327367
## Popular Workgroup Issues in Github
328368

329369
<!-- Up to 10 links to interesting issues -->

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.