Update/Add WASM_U-Performance_Record/verify_everything.ps1 for WebAssembly 7.10us record
Browse files
WASM_U-Performance_Record/verify_everything.ps1
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Windows PowerShell Orchestration & Verification Script
|
| 2 |
+
# Watermark: ip zymatica.space | astronautshe.com
|
| 3 |
+
# WASM U-Performance Record verify loop
|
| 4 |
+
|
| 5 |
+
$ErrorActionPreference = "Stop"
|
| 6 |
+
|
| 7 |
+
Write-Host "================================================================================" -ForegroundColor Cyan
|
| 8 |
+
Write-Host " [+] INITIALIZING SKEPTIC-PROOF COMPILATION & VERIFICATION PIPELINE" -ForegroundColor Cyan
|
| 9 |
+
Write-Host " [+] TARGET WORKSPACE: WASM_U-Performance_Record" -ForegroundColor Cyan
|
| 10 |
+
Write-Host "================================================================================" -ForegroundColor Cyan
|
| 11 |
+
|
| 12 |
+
# 1. Compile proof.zig to proof_wasm.wasm
|
| 13 |
+
Write-Host ""
|
| 14 |
+
Write-Host "[1/5] Compiling proof.zig to freestanding WebAssembly..." -ForegroundColor Green
|
| 15 |
+
if (!(Get-Command zig -ErrorAction SilentlyContinue)) {
|
| 16 |
+
Write-Error "Zig compiler is missing from PATH. Please install Zig (https://ziglang.org) to run this script."
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
# Compile wasm
|
| 20 |
+
zig build-exe proof.zig -target wasm32-freestanding -O ReleaseFast --name proof_wasm --export=wasm_encode --export=wasm_get_encoded_bits --export=wasm_decode --export=run_verification
|
| 21 |
+
if (Test-Path "proof_wasm.wasm") {
|
| 22 |
+
$wasmSize = (Get-Item "proof_wasm.wasm").Length
|
| 23 |
+
Write-Host " [+] WebAssembly binary built successfully! Size: $wasmSize bytes (~$([Math]::Round($wasmSize/1024, 2)) KB)" -ForegroundColor Green
|
| 24 |
+
} else {
|
| 25 |
+
Write-Error "WASM compilation failed!"
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
# 2. Compile proof.zig to assembly for inspection
|
| 29 |
+
Write-Host ""
|
| 30 |
+
Write-Host "[2/5] Compiling proof.zig to native assembly (.s) for register audit..." -ForegroundColor Green
|
| 31 |
+
zig build-exe proof.zig -O ReleaseFast -femit-asm --cache-dir ./zig-cache
|
| 32 |
+
if (Test-Path "proof.s") {
|
| 33 |
+
Write-Host " [+] Native assembly dump generated successfully at proof.s" -ForegroundColor Green
|
| 34 |
+
} else {
|
| 35 |
+
Write-Host " [*] Assembly generation skipped or not supported on this platform target." -ForegroundColor Yellow
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
# Run WebAssembly binary structure audit
|
| 39 |
+
Write-Host ""
|
| 40 |
+
Write-Host " [+] Executing WASM structure inspector..." -ForegroundColor Green
|
| 41 |
+
python proof_wasm_inspector.py
|
| 42 |
+
if (Test-Path "proof_wasm_structure.txt") {
|
| 43 |
+
Write-Host " [+] WASM binary structure audit report generated successfully at proof_wasm_structure.txt" -ForegroundColor Green
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
# 3. Run Node.js execution check
|
| 47 |
+
Write-Host ""
|
| 48 |
+
Write-Host "[3/5] Instantiating WASM inside Node.js CLI Benchmark..." -ForegroundColor Green
|
| 49 |
+
if (!(Get-Command node -ErrorAction SilentlyContinue)) {
|
| 50 |
+
Write-Error "Node.js is missing from PATH. Node is required to run the WASM benchmark."
|
| 51 |
+
}
|
| 52 |
+
node proof.js
|
| 53 |
+
|
| 54 |
+
# 4. Run Python Parity Verification Loop
|
| 55 |
+
Write-Host ""
|
| 56 |
+
Write-Host "[4/5] Starting Cross-Runtime Bit-Parity Fuzzer (Python vs WASM)..." -ForegroundColor Green
|
| 57 |
+
if (!(Get-Command python -ErrorAction SilentlyContinue)) {
|
| 58 |
+
Write-Error "Python 3 is missing from PATH. Python is required to run parity tests."
|
| 59 |
+
}
|
| 60 |
+
python proof.py --fuzz
|
| 61 |
+
|
| 62 |
+
# 5. Launch local server for interactive sandbox
|
| 63 |
+
Write-Host ""
|
| 64 |
+
Write-Host "[5/5] Launching local HTTP Server for Interactive Browser Dashboard..." -ForegroundColor Green
|
| 65 |
+
Write-Host " [!] Server hosting at http://localhost:8080/" -ForegroundColor Yellow
|
| 66 |
+
Write-Host " [!] Pasting intent coordinates will compile and decompress them in real-time." -ForegroundColor Yellow
|
| 67 |
+
Write-Host " [!] PRESS CTRL+C TO TERMINATE SERVER PROCESS." -ForegroundColor Red
|
| 68 |
+
Write-Host ""
|
| 69 |
+
|
| 70 |
+
python server.py
|