kitamstudios / rust-analyzer.vs

Rust language support for Visual Studio 2022
https://marketplace.visualstudio.com/items?itemName=kitamstudios.RustAnalyzer
Other
138 stars 10 forks source link

Host rust project in solution like .vcproj, .csproj #23

Closed neuecc closed 1 year ago

neuecc commented 1 year ago

Thank you for the great project and active development.

Currently, This setting up a workspace by opening folders, but can I add something like a csproj (or a cargo.toml) to an sln?

I am currently developing a Rust to C# generator called csbindgen. https://github.com/Cysharp/csbindgen/ The goal is to enable interoperability between Rust and C#, and in projects that deal with both native code and C#, it would be desirable to host multiple C# projects and multiple Rust projects within a single solution. This would also make mixed mode debugging https://github.com/kitamstudios/rust-analyzer.vs/discussions/18 more user-friendly.

I would appreciate hearing your thoughts on this.

parthopdas commented 1 year ago

apologies for the delay. i believe we had this conversation (can't recall where).

*proj based msbuild system doesnt make sense for rust as it adds complexity for an already complex rust build system aka cargo. best ux is to just offload the build to rust.

what we can do however is have the rust project and the csproj in 2 separate child folders of a parent folder. then open the parent folder as a folder. you will be able to see both csproj and rust. you can also switch between views - if you want full csproj support you can switch to project view.

from then on calling rust is like calling into any native code.

i am referring to this button. image

neuecc commented 1 year ago

thank you for the response and useful info! I have not knew Switch solutions and available view. It is not the Best, but I think It works. I'll try that for a while, thanks so much!