Add run script, and VSCode build task
This commit is contained in:
parent
0de7a6e480
commit
b35f2df597
3 changed files with 26 additions and 0 deletions
21
.vscode/tasks.json
vendored
Normal file
21
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "cargo watch",
|
||||
"type": "shell",
|
||||
"command": "bin/run",
|
||||
"args": [],
|
||||
"problemMatcher": [],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"runOptions": {
|
||||
"runOn": "folderOpen"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -37,3 +37,5 @@ nix-shell --run 'cargo run'
|
|||
# build
|
||||
nix-build
|
||||
```
|
||||
|
||||
There is a also a `bin/run` script which starts 'cargo watch'; and it is used by VSCode as well (`Ctrl+Shift+B`).
|
||||
|
|
3
bin/run
Executable file
3
bin/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
exec nix-shell --run 'cargo watch -x run'
|
Loading…
Reference in a new issue