Skip to content

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

@Fucloud233

Description

@Fucloud233

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": [],
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions