Skip to content
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

rust-analyzer not working in non-cargo based projects #18636

Open
Fucloud233 opened this issue Dec 8, 2024 · 3 comments
Open

rust-analyzer not working in non-cargo based projects #18636

Fucloud233 opened this issue Dec 8, 2024 · 3 comments
Labels
C-bug Category: bug

Comments

@Fucloud233
Copy link

Fucloud233 commented Dec 8, 2024

rust-analyzer version: 0.3.2204-standalone (b65911d 2024-11-30)

rustc version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)

editor or extension: VSCode 1.92.0 (Universal)

relevant settings: nothing

I am currently using the rust-analyzer extension to work on a project that does not utilize Cargo. I have read the user manual and followed the instructions to create a rust-project.json file in my project directory. However, the extension appears to be non-functional, and I am unable to locate any error logs in the Output View or Console within VSCode Developer Tools.

I recall that this functionality was working as of October last year. Additionally, I had developed a VSCode extension to simplify the creation of rust-project.json called rust-project, which also seems to be malfunctioning now.

I am reaching out in the hope that you can assist me in resolving this issue. Your help is greatly appreciated.Thank you for your time and assistance.


A example to test:

files structure:

.
├── a.rs
└── rust-project.json

content in rust-project.json

{
    "sysroot": "/your_path_to_sysroot",
    "crates": [
        {
            "root_module": "a.rs",
            "edition": "2021",
            "deps": [],
        }
    ]
}
@ChayimFriedman2
Copy link
Contributor

Do you get any logs in the Output panel?

@Veykril
Copy link
Member

Veykril commented Dec 9, 2024

This might be what was observed in #18511, so disabling rust-analyzer.cargo.sysrootQueryMetadata might the problem for you

@Fucloud233
Copy link
Author

Fucloud233 commented Dec 9, 2024

Do you get any logs in the Output panel?

Thanks for your replying. I can't find any logs in output panel, Rust Analyzer Language Server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants