环境
manjaro
sudo pacman -S rustup
rustup default stable
cargo install rustfmt
vscode
ext install rust-lang.rust-analyzer
ext install serayuzgur.crates
ext install tamasfe.even-better-toml
创建项目
cargo new xxx
调试模板
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "rust",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/target/debug/${workspaceFolderBasename}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"preLaunchTask": "build"
}
]
}
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "cargo build"
}
]
}
标签:cargo,tasks,配置,ext,开发,build,install,rust
From: https://www.cnblogs.com/ziyouchutuwenwu/p/16995461.html