@xaidenlabs/uso 1.1.64 → 1.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +293 -120
- package/package.json +1 -1
- package/src/platforms/linux.js +23 -7
package/README.md
CHANGED
|
@@ -1,277 +1,450 @@
|
|
|
1
1
|
# Universal Solana Orchestrator (USO)
|
|
2
2
|
|
|
3
|
-
**The fastest way to build on Solana.**
|
|
3
|
+
> **The fastest way to build on Solana — on any OS.**
|
|
4
4
|
|
|
5
|
-
USO
|
|
5
|
+
USO is a zero-friction CLI toolchain that installs, manages, and runs your entire Solana development environment with a single command. Native or Stealth WSL. Your choice.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **Universal:** Runs natively on macOS, Linux, and Windows.
|
|
9
|
-
- **Stealth WSL:** On Windows, USO can deploy a hidden "Uso Engine" (WSL2) to run your build, test, and validator commands in a rock-solid Linux environment, while you stay in PowerShell. No "Access Denied" errors. No friction.
|
|
7
|
+
---
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Quick Start](#quick-start)
|
|
13
|
+
- [Stealth WSL Mode (Windows)](#stealth-wsl-mode-windows)
|
|
14
|
+
- [Full Environment Setup](#full-environment-setup)
|
|
15
|
+
- [Granular Installation](#granular-installation)
|
|
16
|
+
- [Project Scaffolding](#project-scaffolding)
|
|
17
|
+
- [Workflow Commands](#workflow-commands)
|
|
18
|
+
- [Wallet & SOL Commands](#wallet--sol-commands)
|
|
19
|
+
- [Developer Tools](#developer-tools)
|
|
20
|
+
- [Diagnostics & Verification](#diagnostics--verification)
|
|
21
|
+
- [Windows Security & Unblocking](#windows-security--unblocking)
|
|
22
|
+
- [Uninstallation](#uninstallation)
|
|
23
|
+
- [Command Reference](#command-reference)
|
|
24
|
+
- [Troubleshooting](#troubleshooting)
|
|
12
25
|
|
|
13
26
|
---
|
|
14
27
|
|
|
15
28
|
## Installation
|
|
16
29
|
|
|
17
|
-
Install USO globally
|
|
30
|
+
Install USO globally via npm. Node.js (LTS recommended) must be installed first.
|
|
18
31
|
|
|
19
32
|
```bash
|
|
20
33
|
npm install -g @xaidenlabs/uso
|
|
21
34
|
```
|
|
22
35
|
|
|
23
36
|
**Prerequisites:**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
| Requirement | Details |
|
|
38
|
+
|---|---|
|
|
39
|
+
| Node.js | v18+ LTS recommended |
|
|
40
|
+
| npm | Comes with Node.js |
|
|
41
|
+
| Administrator (Windows) | Some steps require elevated privileges — USO handles this automatically |
|
|
42
|
+
| C++ Build Tools (Windows) | Required by Rust. Install via Visual Studio Build Tools → "Desktop development with C++" |
|
|
43
|
+
| WSL2 (Stealth Mode) | Windows Subsystem for Linux 2, enabled in Windows Settings |
|
|
27
44
|
|
|
28
45
|
---
|
|
29
46
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
### System Diagnostics
|
|
33
|
-
|
|
34
|
-
Before attempting installation, you can run a diagnostic check to evaluate the current state of your environment.
|
|
47
|
+
## Quick Start
|
|
35
48
|
|
|
36
49
|
```bash
|
|
50
|
+
# 1. Diagnose your environment first
|
|
37
51
|
uso doctor
|
|
38
|
-
```
|
|
39
52
|
|
|
40
|
-
|
|
53
|
+
# 2. Install the full stack (Rust + Solana + Anchor)
|
|
54
|
+
uso init
|
|
55
|
+
|
|
56
|
+
# 3. Verify everything is working
|
|
57
|
+
uso verify
|
|
58
|
+
|
|
59
|
+
# 4. Create your first project
|
|
60
|
+
uso create my-project
|
|
61
|
+
cd my-project && npm install
|
|
62
|
+
|
|
63
|
+
# 5. Start coding
|
|
64
|
+
uso dev
|
|
65
|
+
```
|
|
41
66
|
|
|
42
67
|
---
|
|
43
68
|
|
|
44
|
-
|
|
69
|
+
## Stealth WSL Mode (Windows Only)
|
|
45
70
|
|
|
46
|
-
|
|
71
|
+
**The recommended mode for Windows developers.** Stealth Mode deploys a hidden WSL2 Linux environment (the "Uso Engine") that runs all your tooling inside Linux while you stay in PowerShell.
|
|
47
72
|
|
|
48
73
|
```bash
|
|
49
|
-
uso init
|
|
74
|
+
uso init --wsl
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**What this does:**
|
|
78
|
+
1. Installs a minimal Ubuntu WSL2 distro hidden from Windows Terminal
|
|
79
|
+
2. Installs Rust, Solana CLI, and Anchor inside the distro
|
|
80
|
+
3. Stores your configuration in `~/.uso-config.json`
|
|
81
|
+
4. All future `uso` commands auto-route through the WSL engine — transparently
|
|
82
|
+
|
|
83
|
+
**Why use it?**
|
|
84
|
+
- Eliminates `os error 1314` (symlink privilege errors)
|
|
85
|
+
- Bypasses Windows Smart App Control (`os error 4551`)
|
|
86
|
+
- Eliminates "Access Denied" on build artifacts
|
|
87
|
+
- The validator binds to `127.0.0.1` — tests connect seamlessly from Windows
|
|
88
|
+
|
|
89
|
+
**Check your current mode:**
|
|
90
|
+
```bash
|
|
91
|
+
cat ~/.uso-config.json
|
|
92
|
+
# { "mode": "wsl", "distro": "Ubuntu" }
|
|
50
93
|
```
|
|
51
94
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
5. Build and install the Anchor Version Manager (AVM) and Anchor Framework.
|
|
58
|
-
6. Generate a new Solana wallet if one is not detected.
|
|
95
|
+
**Switch back to native mode:**
|
|
96
|
+
```bash
|
|
97
|
+
# Delete the config to use native toolchain
|
|
98
|
+
del %USERPROFILE%\.uso-config.json
|
|
99
|
+
```
|
|
59
100
|
|
|
60
|
-
**Note:**
|
|
101
|
+
> **Note:** Even in Stealth Mode, USO prefers native binaries if they're available in PATH. The WSL engine is only used when a native binary is missing.
|
|
61
102
|
|
|
62
103
|
---
|
|
63
104
|
|
|
64
|
-
|
|
105
|
+
## Full Environment Setup
|
|
65
106
|
|
|
66
|
-
|
|
107
|
+
Install the complete Solana development stack in one command:
|
|
67
108
|
|
|
68
|
-
**Enable Stealth Mode:**
|
|
69
109
|
```bash
|
|
70
|
-
uso init
|
|
110
|
+
uso init
|
|
71
111
|
```
|
|
72
112
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
113
|
+
USO will:
|
|
114
|
+
1. Detect your operating system (Windows / macOS / Linux)
|
|
115
|
+
2. Check for C++ Build Tools (Windows only)
|
|
116
|
+
3. Install the Rust toolchain via `rustup`
|
|
117
|
+
4. Install the Solana CLI (Agave release)
|
|
118
|
+
5. Install the Anchor Version Manager (AVM) and Anchor Framework
|
|
119
|
+
6. Generate a new Solana wallet `~/.config/solana/id.json` if none exists
|
|
120
|
+
7. Update your system PATH
|
|
80
121
|
|
|
81
|
-
**
|
|
122
|
+
> **Windows Users:** You may see a UAC prompt. Click **Yes** to allow the installer. USO auto-retries any step that fails with a privilege error.
|
|
82
123
|
|
|
83
124
|
---
|
|
84
125
|
|
|
85
|
-
|
|
126
|
+
## Granular Installation
|
|
86
127
|
|
|
87
|
-
|
|
128
|
+
Already have some tools installed? Install only what you need:
|
|
88
129
|
|
|
89
|
-
**Install Rust:**
|
|
90
130
|
```bash
|
|
131
|
+
# Install Rust only
|
|
91
132
|
uso install rust
|
|
92
|
-
```
|
|
93
133
|
|
|
94
|
-
|
|
95
|
-
```bash
|
|
134
|
+
# Install Solana CLI only
|
|
96
135
|
uso install solana
|
|
136
|
+
|
|
137
|
+
# Install Anchor Framework only
|
|
138
|
+
uso install anchor
|
|
97
139
|
```
|
|
98
140
|
|
|
99
|
-
|
|
141
|
+
These also work with `uso init <component>`:
|
|
100
142
|
```bash
|
|
101
|
-
uso
|
|
143
|
+
uso init rust
|
|
144
|
+
uso init solana
|
|
145
|
+
uso init anchor
|
|
102
146
|
```
|
|
103
147
|
|
|
104
148
|
---
|
|
105
149
|
|
|
106
|
-
|
|
150
|
+
## Project Scaffolding
|
|
107
151
|
|
|
108
|
-
|
|
152
|
+
Create a new, production-ready Anchor project with all boilerplate pre-configured:
|
|
109
153
|
|
|
110
154
|
```bash
|
|
111
155
|
uso create <project-name>
|
|
112
156
|
```
|
|
113
157
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
158
|
+
**Example:**
|
|
159
|
+
```bash
|
|
160
|
+
uso create my-nft-program
|
|
161
|
+
cd my-nft-program
|
|
162
|
+
npm install
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**What you get:**
|
|
166
|
+
```
|
|
167
|
+
my-nft-program/
|
|
168
|
+
├── Anchor.toml # Pre-configured for localnet
|
|
169
|
+
├── programs/
|
|
170
|
+
│ └── my-nft-program/
|
|
171
|
+
│ └── src/
|
|
172
|
+
│ └── lib.rs # Your Rust smart contract
|
|
173
|
+
├── tests/
|
|
174
|
+
│ └── my-nft-program.ts # TypeScript test suite
|
|
175
|
+
├── package.json
|
|
176
|
+
└── tsconfig.json
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Run your first test:
|
|
180
|
+
```bash
|
|
181
|
+
uso test
|
|
182
|
+
```
|
|
118
183
|
|
|
119
184
|
---
|
|
120
185
|
|
|
121
|
-
|
|
186
|
+
## Workflow Commands
|
|
187
|
+
|
|
188
|
+
All commands work in both Native and Stealth WSL mode. USO routes them correctly automatically.
|
|
122
189
|
|
|
123
|
-
|
|
190
|
+
### Build
|
|
191
|
+
|
|
192
|
+
Compile your Anchor program (wraps `anchor build`):
|
|
124
193
|
|
|
125
|
-
**Build your program:**
|
|
126
194
|
```bash
|
|
127
195
|
uso build
|
|
128
196
|
```
|
|
129
197
|
|
|
130
|
-
|
|
198
|
+
On Windows with Smart App Control, USO automatically:
|
|
199
|
+
- Cleans stale blocked build artifacts
|
|
200
|
+
- Retries in an elevated Administrator terminal
|
|
201
|
+
- Mirrors output back to your current window
|
|
202
|
+
|
|
203
|
+
### Test
|
|
204
|
+
|
|
205
|
+
Run your Anchor test suite (wraps `anchor test`):
|
|
206
|
+
|
|
131
207
|
```bash
|
|
132
208
|
uso test
|
|
209
|
+
|
|
210
|
+
# Pass flags directly to anchor test
|
|
211
|
+
uso test -- --skip-deploy
|
|
133
212
|
```
|
|
134
|
-
On Windows, USO automatically checks if a validator is running before starting tests, preventing hangs.
|
|
135
213
|
|
|
136
|
-
**
|
|
214
|
+
> **Windows Smart Behavior:** Before running tests, USO checks if a local validator is running on port `8899`. If one is detected, it adds `--skip-local-validator` automatically to prevent Anchor from hanging.
|
|
215
|
+
|
|
216
|
+
### Deploy
|
|
217
|
+
|
|
218
|
+
Deploy your compiled program to the configured cluster:
|
|
219
|
+
|
|
137
220
|
```bash
|
|
138
221
|
uso deploy
|
|
139
222
|
```
|
|
140
223
|
|
|
141
|
-
|
|
224
|
+
### Clean
|
|
225
|
+
|
|
226
|
+
Remove all build artifacts (wraps `anchor clean`):
|
|
227
|
+
|
|
142
228
|
```bash
|
|
143
229
|
uso clean
|
|
144
230
|
```
|
|
145
231
|
|
|
146
232
|
---
|
|
147
233
|
|
|
148
|
-
|
|
234
|
+
## Wallet & SOL Commands
|
|
235
|
+
|
|
236
|
+
All wallet commands wrap the native `solana` CLI and route through the WSL engine in Stealth Mode.
|
|
149
237
|
|
|
150
|
-
|
|
238
|
+
### Check Your Wallet Address
|
|
151
239
|
|
|
152
|
-
**Show your wallet address:**
|
|
153
240
|
```bash
|
|
154
241
|
uso address
|
|
155
242
|
```
|
|
156
243
|
|
|
157
|
-
|
|
244
|
+
### Check SOL Balance
|
|
245
|
+
|
|
158
246
|
```bash
|
|
247
|
+
# Your default wallet
|
|
159
248
|
uso balance
|
|
160
|
-
```
|
|
161
249
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
uso balance <address>
|
|
250
|
+
# Any specific address
|
|
251
|
+
uso balance <WALLET_ADDRESS>
|
|
165
252
|
```
|
|
166
253
|
|
|
167
|
-
|
|
254
|
+
### Airdrop SOL (Devnet/Testnet)
|
|
255
|
+
|
|
168
256
|
```bash
|
|
257
|
+
# Airdrop to your default wallet
|
|
169
258
|
uso airdrop 2
|
|
170
|
-
|
|
259
|
+
|
|
260
|
+
# Airdrop to a specific address
|
|
261
|
+
uso airdrop 5 <WALLET_ADDRESS>
|
|
171
262
|
```
|
|
172
263
|
|
|
264
|
+
> Airdrops only work on devnet and testnet. Make sure your Solana CLI cluster is set to `devnet`:
|
|
265
|
+
> ```bash
|
|
266
|
+
> solana config set --url devnet
|
|
267
|
+
> ```
|
|
268
|
+
|
|
173
269
|
---
|
|
174
270
|
|
|
175
|
-
|
|
271
|
+
## Developer Tools
|
|
272
|
+
|
|
273
|
+
### Start a Local Validator
|
|
176
274
|
|
|
177
|
-
**Start a local test validator:**
|
|
178
275
|
```bash
|
|
276
|
+
# Start with default settings
|
|
179
277
|
uso validator
|
|
180
|
-
# or
|
|
278
|
+
# or shorthand:
|
|
181
279
|
uso val
|
|
182
|
-
```
|
|
183
280
|
|
|
184
|
-
|
|
185
|
-
```bash
|
|
281
|
+
# Reset the ledger and start fresh
|
|
186
282
|
uso val --reset
|
|
283
|
+
|
|
284
|
+
# Pass any solana-test-validator flags
|
|
285
|
+
uso val --bpf-program <PROGRAM_ID> <PROGRAM.so>
|
|
187
286
|
```
|
|
188
287
|
|
|
189
|
-
On Windows
|
|
288
|
+
**On Windows:** If the validator fails with "Access Denied", USO automatically:
|
|
289
|
+
1. Spawns an elevated Administrator PowerShell window
|
|
290
|
+
2. Applies Windows Defender exclusions for `solana-test-validator`
|
|
291
|
+
3. Enables Developer Mode for symlink support
|
|
292
|
+
|
|
293
|
+
### Full Developer Mode
|
|
294
|
+
|
|
295
|
+
The all-in-one command for active development:
|
|
190
296
|
|
|
191
|
-
**Full developer mode (Validator + Watcher):**
|
|
192
297
|
```bash
|
|
193
298
|
uso dev
|
|
194
299
|
```
|
|
195
300
|
|
|
196
|
-
This command:
|
|
197
|
-
1.
|
|
198
|
-
2.
|
|
199
|
-
3.
|
|
301
|
+
This single command:
|
|
302
|
+
1. **Detects** if a local validator is already running
|
|
303
|
+
2. **Starts** the validator if none is running (waits up to 60s for it to be ready)
|
|
304
|
+
3. **Runs** your full test suite
|
|
305
|
+
4. **Watches** `programs/**/*.rs` and `tests/**/*.ts` for changes
|
|
306
|
+
5. **Auto-reruns** tests with a 2-second debounce on every save
|
|
307
|
+
|
|
308
|
+
Hit `Ctrl+C` to stop everything.
|
|
200
309
|
|
|
201
310
|
---
|
|
202
311
|
|
|
203
|
-
|
|
312
|
+
## Diagnostics & Verification
|
|
313
|
+
|
|
314
|
+
### Doctor
|
|
315
|
+
|
|
316
|
+
Inspect your environment for any issues:
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
uso doctor
|
|
320
|
+
```
|
|
204
321
|
|
|
205
|
-
|
|
322
|
+
Checks for:
|
|
323
|
+
- Git installation
|
|
324
|
+
- Rust & Cargo version
|
|
325
|
+
- Solana CLI version and PATH
|
|
326
|
+
- Anchor version
|
|
327
|
+
- WSL2 availability (Windows)
|
|
328
|
+
- C++ Build Tools (Windows)
|
|
329
|
+
- Existing wallet file
|
|
330
|
+
|
|
331
|
+
### Verify
|
|
332
|
+
|
|
333
|
+
Perform a real end-to-end verification — builds an actual test Anchor project to confirm everything works:
|
|
206
334
|
|
|
207
335
|
```bash
|
|
208
336
|
uso verify
|
|
209
337
|
```
|
|
210
338
|
|
|
211
|
-
|
|
339
|
+
Run this after `uso init` to confirm your environment is fully operational.
|
|
212
340
|
|
|
213
341
|
---
|
|
214
342
|
|
|
215
|
-
|
|
343
|
+
## Windows Security & Unblocking
|
|
216
344
|
|
|
217
|
-
If
|
|
345
|
+
If builds fail with `os error 4551` or "Application Control policy has blocked", files downloaded from the internet have a "Mark of the Web" (Zone.Identifier) that Windows treats as untrusted.
|
|
218
346
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
347
|
+
**Fix:**
|
|
348
|
+
```bash
|
|
349
|
+
uso unblock
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
This removes the Mark of the Web from all files in your project directory and `~/.cargo/bin`, allowing builds to proceed.
|
|
353
|
+
|
|
354
|
+
After unblocking:
|
|
355
|
+
```bash
|
|
356
|
+
uso test
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Alternative:** Use `uso init --wsl` (Stealth Mode) to sidestep all Windows security restrictions permanently.
|
|
224
360
|
|
|
225
361
|
---
|
|
226
362
|
|
|
227
363
|
## Uninstallation
|
|
228
364
|
|
|
229
|
-
|
|
365
|
+
### Interactive Full Removal
|
|
366
|
+
|
|
367
|
+
Guides you through removing all installed components with confirmation prompts:
|
|
230
368
|
|
|
231
|
-
**Remove All Components (interactive):**
|
|
232
369
|
```bash
|
|
233
370
|
uso uninstall
|
|
234
371
|
```
|
|
235
372
|
|
|
236
|
-
**
|
|
373
|
+
> ⚠️ **Wallet Warning:** The full uninstall will ask about your wallet at `~/.config/solana/id.json`. You must type `DELETE` to confirm its removal. **Back up your keypair first if it holds funds.**
|
|
374
|
+
|
|
375
|
+
### Remove Individual Components
|
|
376
|
+
|
|
237
377
|
```bash
|
|
238
|
-
uso uninstall solana
|
|
239
378
|
uso uninstall rust
|
|
379
|
+
uso uninstall solana
|
|
240
380
|
uso uninstall anchor
|
|
241
381
|
```
|
|
242
382
|
|
|
383
|
+
### Remove USO Itself
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
npm uninstall -g @xaidenlabs/uso
|
|
387
|
+
```
|
|
388
|
+
|
|
243
389
|
---
|
|
244
390
|
|
|
245
391
|
## Command Reference
|
|
246
392
|
|
|
247
|
-
| Command | Description |
|
|
248
|
-
|
|
249
|
-
| `uso init` | Install full stack (Rust
|
|
250
|
-
| `uso init --wsl` | Install via Stealth
|
|
251
|
-
| `uso
|
|
252
|
-
| `uso
|
|
253
|
-
| `uso
|
|
254
|
-
| `uso
|
|
255
|
-
| `uso
|
|
256
|
-
| `uso
|
|
257
|
-
| `uso
|
|
258
|
-
| `uso
|
|
259
|
-
| `uso
|
|
260
|
-
| `uso
|
|
261
|
-
| `uso
|
|
262
|
-
| `uso
|
|
263
|
-
| `uso
|
|
264
|
-
| `uso
|
|
393
|
+
| Command | Alias | Description |
|
|
394
|
+
|---|---|---|
|
|
395
|
+
| `uso init` | `uso setup` | Install full stack (Rust + Solana + Anchor) |
|
|
396
|
+
| `uso init --wsl` | — | Install via hidden WSL2 Stealth Engine (Windows) |
|
|
397
|
+
| `uso init rust` | `uso install rust` | Install Rust only |
|
|
398
|
+
| `uso init solana` | `uso install solana` | Install Solana CLI only |
|
|
399
|
+
| `uso init anchor` | `uso install anchor` | Install Anchor Framework only |
|
|
400
|
+
| `uso doctor` | — | Diagnose environment |
|
|
401
|
+
| `uso verify` | — | End-to-end verification build |
|
|
402
|
+
| `uso create <name>` | — | Scaffold a new Anchor project |
|
|
403
|
+
| `uso build` | — | Build program (`anchor build`) |
|
|
404
|
+
| `uso test [args]` | — | Run tests (`anchor test`) |
|
|
405
|
+
| `uso deploy` | — | Deploy program (`anchor deploy`) |
|
|
406
|
+
| `uso clean` | — | Clean artifacts (`anchor clean`) |
|
|
407
|
+
| `uso address` | — | Show wallet address |
|
|
408
|
+
| `uso balance [addr]` | — | Show SOL balance |
|
|
409
|
+
| `uso airdrop <n> [addr]` | — | Airdrop SOL (devnet/testnet) |
|
|
410
|
+
| `uso validator [flags]` | `uso val` | Start local test validator |
|
|
411
|
+
| `uso dev` | — | Full dev mode (validator + watcher + tests) |
|
|
412
|
+
| `uso unblock` | — | Remove Mark-of-the-Web (Windows) |
|
|
413
|
+
| `uso uninstall [comp]` | — | Remove installed toolchains |
|
|
265
414
|
|
|
266
415
|
---
|
|
267
416
|
|
|
268
417
|
## Troubleshooting
|
|
269
418
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
419
|
+
**"Command not found" after install**
|
|
420
|
+
> Restart your terminal. PATH changes require a new session to take effect.
|
|
421
|
+
|
|
422
|
+
**"Permission Denied" / `os error 1314`**
|
|
423
|
+
> Run from an Administrator terminal, or use `uso init --wsl` to avoid this entirely.
|
|
424
|
+
|
|
425
|
+
**`os error 4551` / Smart App Control**
|
|
426
|
+
> Run `uso unblock` then retry. Or switch to `uso init --wsl`.
|
|
427
|
+
|
|
428
|
+
**Rust fails to install on Windows**
|
|
429
|
+
> You need the "Desktop development with C++" workload from Visual Studio Build Tools. Download at [visualstudio.microsoft.com/visual-cpp-build-tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
|
|
430
|
+
|
|
431
|
+
**`uso test` hangs on Windows**
|
|
432
|
+
> USO auto-detects this but if it still hangs, start the validator manually first:
|
|
433
|
+
> ```bash
|
|
434
|
+
> uso val
|
|
435
|
+
> # in another terminal:
|
|
436
|
+
> uso test
|
|
437
|
+
> ```
|
|
438
|
+
|
|
439
|
+
**Anchor version mismatch errors**
|
|
440
|
+
> ```bash
|
|
441
|
+
> uso clean
|
|
442
|
+
> uso build
|
|
443
|
+
> ```
|
|
444
|
+
|
|
445
|
+
**Nothing helps**
|
|
446
|
+
> Run `uso doctor` and share the output to diagnose.
|
|
274
447
|
|
|
275
448
|
---
|
|
276
449
|
|
|
277
|
-
**Developed by Xaiden Labs**
|
|
450
|
+
**Developed by Xaiden Labs · [GitHub](https://github.com/Uso-cli) · [npm](https://www.npmjs.com/package/@xaidenlabs/uso) · [Twitter](https://x.com/uso_cli)**
|
package/package.json
CHANGED
package/src/platforms/linux.js
CHANGED
|
@@ -4,18 +4,30 @@ const { log } = require('../utils/logger');
|
|
|
4
4
|
const installLinux = async (shouldInstallRust, shouldInstallSolana) => {
|
|
5
5
|
log.header("🐧 Linux detected.");
|
|
6
6
|
|
|
7
|
-
// 1. Install dependencies
|
|
8
|
-
// We can assume if Rust/Solana are missing, deps might be too.
|
|
9
|
-
// If both are present, we might skip this? For safety, we only run if installing something.
|
|
7
|
+
// 1. Install dependencies
|
|
10
8
|
if (shouldInstallRust || shouldInstallSolana) {
|
|
11
9
|
log.info("🐧 Checking Linux dependencies (libudev, pkg-config)...");
|
|
12
|
-
shell.
|
|
10
|
+
if (shell.which('apt-get')) {
|
|
11
|
+
shell.exec('sudo apt-get update && sudo apt-get install -y libudev-dev pkg-config build-essential');
|
|
12
|
+
} else if (shell.which('dnf')) {
|
|
13
|
+
shell.exec('sudo dnf install -y systemd-devel pkgconf-pkg-config @development-tools');
|
|
14
|
+
} else if (shell.which('yum')) {
|
|
15
|
+
shell.exec('sudo yum install -y systemd-devel pkgconfig @development-tools');
|
|
16
|
+
} else if (shell.which('pacman')) {
|
|
17
|
+
shell.exec('sudo pacman -Sy --noconfirm systemd pkgconf base-devel');
|
|
18
|
+
} else {
|
|
19
|
+
log.warn("⚠️ Could not detect a supported package manager (apt/dnf/yum/pacman). Ensure libudev and pkg-config are installed.");
|
|
20
|
+
}
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
// 2. Install Rust
|
|
16
24
|
if (shouldInstallRust) {
|
|
17
25
|
log.info("🦀 Installing Rust...");
|
|
18
|
-
shell.exec('curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y');
|
|
26
|
+
const rustInstall = shell.exec('curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y');
|
|
27
|
+
if (rustInstall.code !== 0) {
|
|
28
|
+
log.error("❌ Failed to install Rust.");
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
19
31
|
log.success("✅ Rust installed.");
|
|
20
32
|
} else {
|
|
21
33
|
log.info("🦀 Rust is already installed. Skipping.");
|
|
@@ -24,7 +36,11 @@ const installLinux = async (shouldInstallRust, shouldInstallSolana) => {
|
|
|
24
36
|
// 3. Install Solana CLI
|
|
25
37
|
if (shouldInstallSolana) {
|
|
26
38
|
log.info("☀️ Installing Solana CLI...");
|
|
27
|
-
shell.exec('sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"');
|
|
39
|
+
const solanaInstall = shell.exec('sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"');
|
|
40
|
+
if (solanaInstall.code !== 0) {
|
|
41
|
+
log.error("❌ Failed to install Solana CLI.");
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
28
44
|
log.success("✅ Solana CLI installed.");
|
|
29
45
|
} else {
|
|
30
46
|
log.info("☀️ Solana CLI is already installed. Skipping.");
|
|
@@ -33,4 +49,4 @@ const installLinux = async (shouldInstallRust, shouldInstallSolana) => {
|
|
|
33
49
|
return true;
|
|
34
50
|
};
|
|
35
51
|
|
|
36
|
-
module.exports = { installLinux };
|
|
52
|
+
module.exports = { installLinux };
|