|
1 | | -# 🦀 Rust Development Environment Setup (Windows, Offline) |
2 | | - |
3 | | -This guide walks through setting up a complete **Rust development environment** on a **Windows workstation** that does **not have internet access**. |
4 | | - |
5 | | -## 📦 Overview |
6 | | - |
7 | | -You will prepare the following components **on an internet-connected machine**, then **transfer them via USB drive** to the disconnected workstation: |
8 | | - |
9 | | -- Rust toolchain (stable) |
10 | | -- Cargo packages (pre-downloaded) |
11 | | -- VSCode + Rust extension (offline VSIX) |
12 | | -- Build tools (C++ compiler) |
13 | | -- Optional: `rust-analyzer`, documentation |
14 | | - |
15 | | ---- |
16 | | - |
17 | | -## ✅ Prerequisites |
18 | | - |
19 | | -### 🖥️ On Target Workstation (Disconnected) |
20 | | - |
21 | | -- Windows 10 or 11 |
22 | | -- Administrator privileges (optional but helpful) |
23 | | -- USB port for transfer |
24 | | - |
25 | | -### 💻 On Source Machine (Internet Connected) |
26 | | - |
27 | | -- A separate Windows/Linux/Mac machine |
28 | | -- Internet access |
29 | | -- USB drive with at least 10 GB free |
30 | | - |
31 | | ---- |
32 | | - |
33 | | -## 🔁 Step 1: Prepare Rust Toolchain |
34 | | - |
35 | | -### On Connected Machine: |
36 | | - |
37 | | -1. Download the Windows Rust installer: |
38 | | - |
39 | | -```bash |
40 | | -https://static.rust-lang.org/dist/rust-1.77.2-x86_64-pc-windows-msvc.msi |
41 | | - |
42 | | -``` |
43 | | -> Replace version with latest stable, if needed. |
44 | | -
|
45 | | -2. Download associated `cargo`, `rustc`, and `rust-docs` tarballs: |
46 | | -```bash |
47 | | -https://static.rust-lang.org/dist/cargo-1.77.2-x86_64-pc-windows-msvc.tar.gz |
48 | | -https://static.rust-lang.org/dist/rustc-1.77.2-x86_64-pc-windows-msvc.tar.gz |
49 | | -https://static.rust-lang.org/dist/rust-docs-1.77.2-x86_64-pc-windows-msvc.tar.gz |
50 | | - |
51 | | -``` |
52 | | - |
53 | | -3. Download `rustup-init.exe` **if you want to use rustup offline:** |
54 | | -```bash |
55 | | -https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe |
56 | | - |
57 | | -``` |
58 | | - |
59 | | -4. Transfer all files to USB. |
60 | | - |
61 | | ---- |
62 | | - |
63 | | -## 🧰 Step 2: Install Rust Offline |
64 | | - |
65 | | -**On Target Workstation:** |
66 | | - |
67 | | -1. Run the MSI installer: |
68 | | -```powershell |
69 | | -rust-1.77.2-x86_64-pc-windows-msvc.msi |
70 | | -
|
71 | | -``` |
72 | | -> You can also run `rustup-init.exe` with the following: |
73 | | -
|
74 | | -```powershell |
75 | | -.\rustup-init.exe --default-toolchain 1.77.2 --no-update-default |
76 | | -
|
77 | | -``` |
78 | | - |
79 | | -2. Confirm installation: |
80 | | - |
81 | | -```powershell |
82 | | -rustc --version |
83 | | -cargo --version |
84 | | -
|
85 | | -``` |
86 | | ---- |
87 | | - |
88 | | -## 🧱 Step 3: Install C++ Build Tools (MSVC) |
89 | | - |
90 | | -1. On internet-connected machine, download: |
91 | | - |
92 | | -* **Build Tools for Visual Studio 2022:** |
93 | | -```powershell |
94 | | -https://aka.ms/vs/17/release/vs_BuildTools.exe |
95 | | -
|
96 | | -``` |
97 | | - |
98 | | -2. On the connected machine, run: |
99 | | -```powershell |
100 | | -.\vs_BuildTools.exe --layout .\offline_vs_buildtools --lang en-US --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 |
101 | | -
|
102 | | -``` |
103 | | -> This creates an **offline installer** directory. |
104 | | -
|
105 | | -3. Transfer `offline_vs_buildtools` folder to target. |
106 | | - |
107 | | -4. On the disconnected workstation: |
108 | | - |
109 | | -```powershell |
110 | | -.\offline_vs_buildtools\vs_BuildTools.exe --noweb --quiet --wait |
111 | | -
|
112 | | -``` |
113 | | ---- |
114 | | - |
115 | | -## 🧩 Step 4: Set Up VSCode Offline |
116 | | - |
| 1 | +# 🦀 Rust Development Environment Setup (Windows, Offline) |
| 2 | + |
| 3 | +This guide walks through setting up a complete **Rust development environment** on a **Windows workstation** that does **not have internet access**. |
| 4 | + |
| 5 | +## 📦 Overview |
| 6 | + |
| 7 | +You will prepare the following components **on an internet-connected machine**, then **transfer them via USB drive** to the disconnected workstation: |
| 8 | + |
| 9 | +- Rust toolchain (stable) |
| 10 | +- Cargo packages (pre-downloaded) |
| 11 | +- VSCode + Rust extension (offline VSIX) |
| 12 | +- Build tools (C++ compiler) |
| 13 | +- Optional: `rust-analyzer`, documentation |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## ✅ Prerequisites |
| 18 | + |
| 19 | +### 🖥️ On Target Workstation (Disconnected) |
| 20 | + |
| 21 | +- Windows 10 or 11 |
| 22 | +- Administrator privileges (optional but helpful) |
| 23 | +- USB port for transfer |
| 24 | + |
| 25 | +### 💻 On Source Machine (Internet Connected) |
| 26 | + |
| 27 | +- A separate Windows/Linux/Mac machine |
| 28 | +- Internet access |
| 29 | +- USB drive with at least 10 GB free |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## 🔁 Step 1: Prepare Rust Toolchain |
| 34 | + |
| 35 | +### On Connected Machine: |
| 36 | + |
| 37 | +1. Download the Windows Rust installer: |
| 38 | + |
| 39 | +```bash |
| 40 | +https://static.rust-lang.org/dist/rust-1.77.2-x86_64-pc-windows-msvc.msi |
| 41 | + |
| 42 | +``` |
| 43 | + |
| 44 | +> Replace version with latest stable, if needed. |
| 45 | +
|
| 46 | +1. Download associated `cargo`, `rustc`, and `rust-docs` tarballs: |
| 47 | + |
| 48 | +```bash |
| 49 | +https://static.rust-lang.org/dist/cargo-1.77.2-x86_64-pc-windows-msvc.tar.gz |
| 50 | +https://static.rust-lang.org/dist/rustc-1.77.2-x86_64-pc-windows-msvc.tar.gz |
| 51 | +https://static.rust-lang.org/dist/rust-docs-1.77.2-x86_64-pc-windows-msvc.tar.gz |
| 52 | + |
| 53 | +``` |
| 54 | + |
| 55 | +1. Download `rustup-init.exe` **if you want to use rustup offline:** |
| 56 | + |
| 57 | +```bash |
| 58 | +https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe |
| 59 | + |
| 60 | +``` |
| 61 | + |
| 62 | +1. Transfer all files to USB. |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## 🧰 Step 2: Install Rust Offline |
| 67 | + |
| 68 | +**On Target Workstation:** |
| 69 | + |
| 70 | +1. Run the MSI installer: |
| 71 | + |
| 72 | +```powershell |
| 73 | +rust-1.77.2-x86_64-pc-windows-msvc.msi |
| 74 | +
|
| 75 | +``` |
| 76 | + |
| 77 | +> You can also run `rustup-init.exe` with the following: |
| 78 | +
|
| 79 | +```powershell |
| 80 | +.\rustup-init.exe --default-toolchain 1.77.2 --no-update-default |
| 81 | +
|
| 82 | +``` |
| 83 | + |
| 84 | +1. Confirm installation: |
| 85 | + |
| 86 | +```powershell |
| 87 | +rustc --version |
| 88 | +cargo --version |
| 89 | +
|
| 90 | +``` |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## 🧱 Step 3: Install C++ Build Tools (MSVC) |
| 95 | + |
| 96 | +1. On internet-connected machine, download: |
| 97 | + |
| 98 | +- **Build Tools for Visual Studio 2022:** |
| 99 | + |
| 100 | +```powershell |
| 101 | +https://aka.ms/vs/17/release/vs_BuildTools.exe |
| 102 | +
|
| 103 | +``` |
| 104 | + |
| 105 | +1. On the connected machine, run: |
| 106 | + |
| 107 | +```powershell |
| 108 | +.\vs_BuildTools.exe --layout .\offline_vs_buildtools --lang en-US --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 |
| 109 | +
|
| 110 | +``` |
| 111 | + |
| 112 | +> This creates an **offline installer** directory. |
| 113 | +
|
| 114 | +1. Transfer `offline_vs_buildtools` folder to target. |
| 115 | + |
| 116 | +2. On the disconnected workstation: |
| 117 | + |
| 118 | +```powershell |
| 119 | +.\offline_vs_buildtools\vs_BuildTools.exe --noweb --quiet --wait |
| 120 | +
|
| 121 | +``` |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +## 🧩 Step 4: Set Up VSCode Offline |
0 commit comments