The Rust Analyzer extension does not work with gdnative out of the box. This is the main extension used in several IDEs for Rust: https://github.com/rust-lang/rust-analyzer
@chitoyuu suggested enabling the "one-class-one-file" feature on gdnative-bindings. I did this and autocomplete suggestions, hovering comments, etc. start working again! :)
I ran several builds on my machine with "one-class-one-file" enabled and disabled using this command per @fpdotmonkey's suggestion
cargo clean && cargo build --timings
And got this result:
Finished dev [unoptimized + debuginfo] target(s) in 18.15s
Each build has been between 18 ~ 19 seconds on my machine. There were not any discernible performance differences between the feature being enabled or disabled. In both cases, the builds were between 18 ~ 19 seconds and neither would consistently run any faster than the other.
However, without having this feature enabled, rust-analyzer does not work with gdnative. Therefore, I suggest enabling this feature by default.
I will also be putting in an issue with rust-analyzer as I do think rust-analyzer should work with minified libraries. But for now, this is a good workaround, and improves the user experience with gdnative.
The Rust Analyzer extension does not work with gdnative out of the box. This is the main extension used in several IDEs for Rust: https://github.com/rust-lang/rust-analyzer
@chitoyuu suggested enabling the "one-class-one-file" feature on gdnative-bindings. I did this and autocomplete suggestions, hovering comments, etc. start working again! :)
I ran several builds on my machine with "one-class-one-file" enabled and disabled using this command per @fpdotmonkey's suggestion
And got this result:
Each build has been between 18 ~ 19 seconds on my machine. There were not any discernible performance differences between the feature being enabled or disabled. In both cases, the builds were between 18 ~ 19 seconds and neither would consistently run any faster than the other.
However, without having this feature enabled, rust-analyzer does not work with gdnative. Therefore, I suggest enabling this feature by default.
I will also be putting in an issue with rust-analyzer as I do think rust-analyzer should work with minified libraries. But for now, this is a good workaround, and improves the user experience with gdnative.