godot-rust / gdext

Rust bindings for Godot 4
https://mastodon.gamedev.place/@GodotRust
Mozilla Public License 2.0
3.06k stars 190 forks source link

Missing IDE Support with RustRover or CLion + Rust plugin #435

Closed NicolasVidal closed 1 year ago

NicolasVidal commented 1 year ago

Hello, I'm quite new to the Godot community and I try to use Rust in Godot. I noticed (it's also true with GDNative) that RustRover or Rust plugin in Clion don't seem to recognize Godot structs.

For instance, if I follow the tutorial : image

Thus, I have no completion or help in the IDE regarding Godot types which is a bit annoying. I was wondering if I was missing a configuration step or anything else.

This is not a blocking issue as I can compile and test in Godot the rotating sprite with success, but it would be quite convenient if the IDE was playing nice with the godot crate.

Thank you for your future answers and for your awesome work.

Cheers.

Nicolas.

Bromeon commented 1 year ago

I'm using CLion for everyday development and don't have this issue. Did it occur with CLion or just the experimental RustRover?

Can you try refreshing the Cargo menu on the right of your IDE?

Cargo menu

NicolasVidal commented 1 year ago

Hello @Bromeon, Thank you for your quick reply.

Indeed it is the case in RustRover and CLion + Rust plugin.

Reloading the cargo project in the tool window did the trick for gdext, but not for my other project in gdnative.

Maybe I should move this issue in GDNative then ?

Thank you again for you quick reply.

NicolasVidal commented 1 year ago

ok I found the issue already opened in gdnative repo, closing this one. https://github.com/godot-rust/gdnative/issues/789