-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathquickstart.ps1
More file actions
96 lines (81 loc) · 4.84 KB
/
Copy pathquickstart.ps1
File metadata and controls
96 lines (81 loc) · 4.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Quick start script for Solana Secure Signer (Windows/PowerShell)
$ErrorActionPreference = "Stop"
Write-Host "╔════════════════════════════════════════════════════════════════╗" -ForegroundColor Cyan
Write-Host "║ SOLANA SECURE SIGNER - QUICK START SETUP ║" -ForegroundColor Cyan
Write-Host "╚════════════════════════════════════════════════════════════════╝" -ForegroundColor Cyan
Write-Host ""
# Check for Rust
try {
$rustVersion = cargo --version
Write-Host "✓ Rust found: $rustVersion" -ForegroundColor Green
} catch {
Write-Host "❌ Rust/Cargo not found!" -ForegroundColor Red
Write-Host ""
Write-Host "Please install Rust first:"
Write-Host " Visit: https://rustup.rs/"
Write-Host " Or run: winget install Rustlang.Rustup"
Write-Host ""
exit 1
}
# Check for Python
try {
$pythonVersion = python --version
Write-Host "✓ Python found: $pythonVersion" -ForegroundColor Green
} catch {
Write-Host "❌ Python not found!" -ForegroundColor Red
Write-Host "Please install Python 3.7+"
exit 1
}
Write-Host ""
# Build the Rust library
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Yellow
Write-Host "Step 1: Building Rust library (release mode)..." -ForegroundColor Yellow
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Yellow
Write-Host ""
Push-Location rust_signer
cargo build --release
Write-Host ""
Write-Host "✓ Rust library built successfully!" -ForegroundColor Green
Write-Host ""
# Run Rust tests
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Yellow
Write-Host "Step 2: Running Rust tests..." -ForegroundColor Yellow
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Yellow
Write-Host ""
cargo test
Write-Host ""
Write-Host "✓ All Rust tests passed!" -ForegroundColor Green
Write-Host ""
Pop-Location
# Run Python example
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Yellow
Write-Host "Step 3: Running Python integration example..." -ForegroundColor Yellow
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Yellow
Write-Host ""
python python_signer_example.py
Write-Host ""
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Green
Write-Host "✓ Setup complete! All tests passed!" -ForegroundColor Green
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Green
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Cyan
Write-Host ""
Write-Host " 1. Review the integration guide:"
Write-Host " Get-Content INTEGRATION_GUIDE.md"
Write-Host ""
Write-Host " 2. Review the security model:"
Write-Host " Get-Content rust_signer\SECURITY.md"
Write-Host ""
Write-Host " 3. Integrate with your Python CLI:"
Write-Host " See INTEGRATION_GUIDE.md for step-by-step instructions"
Write-Host ""
Write-Host "Files created:" -ForegroundColor Cyan
Write-Host " • rust_signer\target\release\solana_secure_signer.dll (FFI library)"
Write-Host " • rust_signer\target\release\solana-signer.exe (CLI binary)"
Write-Host ""
Write-Host "Documentation:" -ForegroundColor Cyan
Write-Host " • README.md - Overview and usage"
Write-Host " • INTEGRATION_GUIDE.md - Step-by-step integration"
Write-Host " • rust_signer\SECURITY.md - Security model details"
Write-Host " • rust_signer\README.md - Rust library documentation"
Write-Host ""