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

Using Rust Cargo TOML variables within VSCode?

$
0
0

I need to prepare a number of exercises for student learning Rust. I've found the use of ${workspaceFolderBasename} within the program field of my launch.json to be quite useful, as in:

"program": "${workspaceFolder}/target/debug/${workspaceFolderBasename}.exe"

This allows me to execute the program using CTRL+F5. However, this only works while the resulting executable has the same name as the workspace folder (i.e. ${workspaceFolderBasename}). I note that the name field in my project's Cargo.toml file has a name field under [package] which controls the name of the resulting executable. Is there a way to use this field within launch.json?


Viewing all articles
Browse latest Browse all 97355

Trending Articles



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