-
Hello, I'm trying to work with the Tonic gRPC framework in Rust using the Rustrover IDE. I've opened the However, I'm seeing red lines in the Rustrover window, indicating that there might be an issue with either:
I am attaching a screenshot here. I'm not sure which one is the case. Could you please provide some guidance on how to resolve this issue? Are there Tonic build commands that I can manually run? Where would Rust files generated? Is there a specific configuration or setting I need to enable in Rustrover to properly load the Tonic-generated Rust files? Any help or suggestions would be greatly appreciated. Thank you in advance! Sean Rustrover version : RustRover 2024.1 EAP |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to resolve the issue with the guidance provided from Discord channel. Here's a summary of what I learned: The target folder is typically placed in the workspace root by Cargo, rather than in each individual subproject or example folder. This is done to optimise disk space usage and enable features like incremental compilation. Cargo determines the workspace root based on the presence of a top-level Cargo.toml file. In my case, I had opened only the examples module in my IDE, rather than the entire Tonic project root. This caused some confusion because the IDE was not aware of the workspace context. However, running cargo build from the command line created the target folder in the correct location, one level above the examples directory. The Rust IDE Rustrover uses Cargo commands in the background, so it relies on Cargo's workspace inference to locate the generated files. By opening the entire Tonic project root in Rustrover, rather than just the examples module, the IDE was able to correctly locate and load the generated Rust files from the target folder. The issue has been resolved. I close this page. |
Beta Was this translation helpful? Give feedback.
I was able to resolve the issue with the guidance provided from Discord channel. Here's a summary of what I learned:
The target folder is typically placed in the workspace root by Cargo, rather than in each individual subproject or example folder. This is done to optimise disk space usage and enable features like incremental compilation. Cargo determines the workspace root based on the presence of a top-level Cargo.toml file.
In my case, I had opened only the examples module in my IDE, rather than the entire Tonic project root. This caused some confusion because the IDE was not aware of the workspace context. However, running cargo build from the command line created the target folder in …