How to launch a Rust application from Visual Studio Code?

前端 未结 4 1307
余生分开走
余生分开走 2020-12-23 12:39

I have installed the Visual Studio Code extensions for Rust:

I want to run my project and I don\'t understand where to click.

I tried clic

4条回答
  •  不思量自难忘°
    2020-12-23 13:10

    I was able to get this working using the VSC extension, Rust (rls), using a modified version of AR's post:

    "tasks": [
        {
            "type": "shell",
            "label": "cargo run",
            "command": "wsl",
            "args": [
                "--",
                "~/.cargo/bin/cargo",
                 "run"
            ],
            "problemMatcher": [
                "$rustc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
    

提交回复
热议问题