Open Bromeon opened 10 months ago
(making a comment since i cant currently edit the issue directly) questions i have seen people ask:
T
from a Gd<T>
Also a comment i made on discord about this list that im copying in here:
I think it'd be useful for this issue to not only track candidates for a potential future FAQ, but also other frequently asked questions people actually have. then we can in the future discuss where to best document the questions, whether it be in the FAQ, the book, or the API-docs.
Looking through current threads in #help-gdext
, some possible candidates, with possible links to some additional tooling available:
Gd<T>
- bind()
/bind_mut()
additional explanationinit
impl#[test]
doesn't work with Godot types, possible link to gd-rehearse#[func(gd_self)]
applicationsInstanceID
(though depends of how temporary this workaround would be needed, seeing the current work made in multi-threading)gdext
often they are caused by not enabling the experimental-godot-api
feature*_ex
methods maybe not as relevant of a question, but i've ran into this issue a couple times, which i think would be useful to point as a common case:
how do i make sure my exported game has access to the gdextension for release builds?
as of now, my game i exported with a .so
or a .dll
accompanying the executable. when people download my game from Itch.io or another place where they tend to get the game in a .zip
file, they usually run the game without extracting it, and that has been causing a couple issues getting the game to work.
another issue is getting it to access the glibc provided by the OS. i've had a couple of linux build failing to recognize a package as the proper version required by the .so
, and the game fails to run.
i think this question would cover a common enough case for the FAQ.
possible to export as c# callable rust.dll?
@GeorgeS2019 could you elaborate?
https://github.com/godot-rust/gdext/tree/master/godot-ffi
If my understanding is correct, RUST is available as GDExtension.
Is it possible to write RUST code to expose ported rust codes for c# consumption, e.g. https://github.com/virtual-puppet-project/real-time-lip-sync-gd/pull/3
GDExtensions can register custom classes and functions with the Godot engine, which then behave like built-in classes. So yes, they can also be invoked from C#. When it comes to dependencies and code generation, that's another topic though, see https://github.com/godot-rust/gdext/issues/615.
Regarding whether this can be in FAQ: yes 🙂
Pytorch Reinforcemnt Learning (RL) framework: Stable-baseline as Godot4 Rust GDExtension
Currently, there is an attempt sb3-burn to port the famous Pytorch RL framework to RUST using Rust burn deep learning framework.
For Godot4, there is an active GodotRL community with many examples using the PyTorch Stable-baseline3 RL framework through e.g. socket communication.
If there is effort to develop the Godot4 Rust GDExtension for sb3-burn, this creates new opportunities for RL training independent of Python.
@GeorgeS2019 This is an issue regarding FAQ about the library itself, and not the place for advertising other projects. If your project is based on godot-rust, feel free to use our #showcase channel on Discord.
It's not yet clear whether we'll have an FAQ section in the book and if yes, how we are going to structure it. One idea would be to have 100% of the information as part of the tutorial, and use the FAQ only to refer to different chapters and sections. This way, people reading the book from A-Z would not miss anything, and we don't have to duplicate content.
This issue tracks potential candidates for often-asked questions. Once more basic parts of the book are done, we can decide what to do with these. Very basic questions such as "how can I use
Gd
" or "how do I export an enum" should NOT be part of the FAQ, these should be covered in the tutorial.Questions, by category
Classes and objects
init
take parameters?T
from aGd<T>
?GodotClass
?GDExtension entry point 'gdext_rust_init' not found in library
Typically indicates thatlib.rs
is not compiled, or the cdylib is created in a different path.Tooling