Skip to content

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

我的neovim的init.lua

创建rust项目

cargo new hello-rust
cd hello-rust
zed .
fn main() {
    let name = "Ashe";
    println!("Hello, {}!", name);
}
cargo check
cargo run
cargo clippy

Comments