当前位置: 首页>后端>正文

Rust-Env

rust-portal: https://www.rust-lang.org/zh-CN/tools/install
rust-online: https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=b8867552819a3540b26e4ddcb1cf261d

tutorial:
https://www.runoob.com/rust/rust-setup.html
https://rustwiki.org/zh-CN/cargo/getting-started/installation.html

1.Get cargo,rustc
https://rustup.rs/

32bit
https://win.rustup.rs/
x64bit
https://win.rustup.rs/x86_64

RUSTUP_HOME
C:\Users\Administrator.rustup

CARGO_HOME
C:\Users\Administrator.cargo

default host triple: x86_64-pc-windows-msvc
default toolchain: stable (default)
profile: default
modify PATH variable: yes

  1. Proceed with installation (default)
  2. Customize installation
  3. Cancel installation

1

info: profile set to 'default'
info: default host triple is x86_64-pc-windows-msvc
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2023-11-16, rust version 1.74.0 (79e9716c9 2023-11-13)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-pc-windows-msvc'

stable-x86_64-pc-windows-msvc installed - rustc 1.74.0 (79e9716c9 2023-11-13)

Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload its PATH environment variable to include
Cargo's bin directory (%USERPROFILE%.cargo\bin).

2.vscode
https://code.visualstudio.com/Download
2.1.plugin
rust-analyzer(CN)
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/rust-lang/vsextensions/rust-analyzer/0.4.1737/vspackage

Native Debug
Dracula For Rust Theme
Cargo

2.2.create project
Terminal->New Terminal
cd src
cd rust

cargo new greeting
cargo build
cargo run


https://www.xamrdz.com/backend/3o61941385.html

相关文章: