Environment
环境安装¶
https://rust-lang.org/tools/install/
验证环境¶
rustc --version
cargo --version
rustfmt --version
cargo clippy --version
IDE¶
Zed (recommend)¶
- Crates LSP (extension)
Neovim¶
- rustaceanvim
- treesitter
- cmp
- telescope.nvim
- crates.nvim
- neo-tree.nvim
创建rust项目¶
cargo new hello-rust
cd hello-rust
zed .
fn main() {
let name = "Ashe";
println!("Hello, {}!", name);
}
cargo check
cargo run
cargo clippy