Rust在Debian的常用开发工具清单
一 核心工具链
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsource $HOME/.cargo/envrustc --version、cargo --versionrustup component add clippy rustfmt rust-src rust-analysisrustup default stable 或 rustup toolchain install stablerustup update二 调试与系统依赖
sudo apt install build-essential gdb,为后续调试、构建与运行测试提供支撑。三 IDE与编辑器支持
sudo apt update && sudo apt install software-properties-common apt-transport-https wgetwget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"sudo apt update && sudo apt install code四 构建、测试、质量与发布工具
cargo new、cargo build、cargo run、cargo test)。rustup component add clippy 后执行 cargo clippy)。cargo fmt)。cargo bench)。cargo install cargo-deb,随后 cargo deb 生成安装包)。五 交叉编译与发布打包
rustup target add armv7-unknown-linux-gnueabihf。cargo build --target armv7-unknown-linux-gnueabihf。sudo dpkg -i target/debian/*.deb。