Instantly share code, notes, and snippets.

Embed
What would you like to do?
executorMap for vscode code runner rust files. Checks if the directory is examples and executes current file, or performs a standard cargo run.
"code-runner.executorMap": {
"rust": "if [ $(basename $dir) = 'examples' ]; then cargo run --example $fileNameWithoutExt; else cargo run; fi",
}
@puffybsd

This comment has been minimized.

Copy link
Owner

puffybsd commented Jan 17, 2019

Copy the user settings for "code-runner.executorMap" and update the "rust" attribute (other languages removed for clarity).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment