Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99112

RUST cargo run task with arguments in vscode

$
0
0

Is there a way to specify arguments to a RUST cargo command running as VS CODE task? Or should I be trying this as an NPM script? (of course, this is RUST, so I am using CARGO and npm, creating a package.json would be odd).

The Build task works fine:

"version": "2.0.0",
"tasks": [
    {
      "type": "cargo",
      "subcommand": "build",
      "problemMatcher": [
        "$rustc"
      ],
      "group": {
        "kind": "build",
        "isDefault": true
      }
},

But I have no idea where to put the arguments since I want it to be

$cargo run [filename]

{
  "type": "cargo",
  "subcommand": "run",
  "problemMatcher": [
    "$rustc"
   ]
}

Viewing all articles
Browse latest Browse all 99112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>