-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathtasks.json
More file actions
32 lines (32 loc) · 1.18 KB
/
tasks.json
File metadata and controls
32 lines (32 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Author : Mehedi Hasan Shifat (jspw)
// Created At : Fri Dec 5 00:59:37 +06 2025
// Task : shortcut to run a rust file which will take input and show output of the programme automatically with programme runtime status such as memory consume and execution time (Linux)
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile and run Rust program (capture output)",
"type": "shell",
"command": "rustc ${relativeFile} && (/usr/bin/time -lp ./${fileBasenameNoExtension} < $INPUT_FILE > $OUTPUT_FILE 2> $TIME_FILE) && rm -f ${fileBasenameNoExtension}",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$rustc",
"options": {
"cwd": "${workspaceFolder}",
"env": {
"INPUT_FILE": "input.txt",
"OUTPUT_FILE": "output.txt",
"TIME_FILE": "time.txt"
}
}
}
]
}