New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for non-Cargo based projects #5594
Comments
also cc/ @dtolnay who might be using rust-project.json now as well at FB |
5690: Introduce `Crate`, `CrateGraphService` r=undin a=vlad20012 *Crate graph* is a simplified project model (comparing to complex [cargo project model](https://github.com/intellij-rust/intellij-rust/blob/master/ARCHITECTURE.md#project-model)) described in terms of *crates* (mostly from `rustc` point of view). Crate is usually a `Target` In terms of Cargo project model This PR solves these problems: 1. It's just simpler to work with Crate graph then with Cargo project model. Some complex code was simplified 2. Sometimes we want to have a (virtual, dummy, fake) crate where there are no cargo targets, e.g. in the case of `doctest`s 3. Now we have API that allows us to get direct/transitive/reverse dependencies of some crate 4. Now we have topological sorting of crates and persistent crate `id`s, both needed for the new name resolution 2.0 5. In theory, this opens a way to support non cargo-based projects (like #5594) 5758: COMP: true/false completion for bool values r=Undin a=ozkriff <!-- Hello and thank you for the pull request! We don't have any strict rules about pull requests, but you might check https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTING.md for some hints! Note that we need an electronic CLA for contributions: https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTING.md#cla After you sign the CLA, please add your name to https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTORS.txt :) --> Fixes #4443 (_"No true/false autocomplete for boolean values"_) Co-authored-by: vlad20012 <beskvlad@gmail.com> Co-authored-by: Andrey Lesnikov <Andrey.Lesnikov@jetbrains.com>
5690: Introduce `Crate`, `CrateGraphService` r=undin a=vlad20012 *Crate graph* is a simplified project model (comparing to complex [cargo project model](https://github.com/intellij-rust/intellij-rust/blob/master/ARCHITECTURE.md#project-model)) described in terms of *crates* (mostly from `rustc` point of view). Crate is usually a `Target` In terms of Cargo project model This PR solves these problems: 1. It's just simpler to work with Crate graph then with Cargo project model. Some complex code was simplified 2. Sometimes we want to have a (virtual, dummy, fake) crate where there are no cargo targets, e.g. in the case of `doctest`s 3. Now we have API that allows us to get direct/transitive/reverse dependencies of some crate 4. Now we have topological sorting of crates and persistent crate `id`s, both needed for the new name resolution 2.0 5. In theory, this opens a way to support non cargo-based projects (like #5594) Co-authored-by: vlad20012 <beskvlad@gmail.com>
Cargo in Idea++; |
Any update or improvements on this? Being able to use Rust without Cargo is essential in some code bases that use central build systems. |
A great starting point could be to support Rust-Analyzer's JSON schema? |
@maxim-banaev any idea of the priority for this? |
I can confirm that Android (AOSP) is also supporting the |
Feature description
The Rust plugin currently only supports projects using Cargo.toml files. For large codebase using a centralized build system, such as Android or Fuchsia, this approach is not practical.
The rust-analyzer project provides an alternative to declare the dependencies (https://rust-analyzer.github.io/manual.html#non-cargo-based-projects). This de facto standard is already generated by Fuchsia and Android.
Would it be possible to add an option to parse this format and automatically generate the dependencies within CLion?
Submitted in CLion tracker: https://youtrack.jetbrains.com/issue/CPP-20821
The text was updated successfully, but these errors were encountered: