/**
* DownloadView — Download page for RVF executables and packages.
*
* Provides download links for:
* - Windows (.exe)
* - macOS (.dmg)
* - Linux (.tar.gz)
* - npm packages
* - WASM module
*
* Download URLs point to Google Cloud Storage (placeholder paths).
*/
const VERSION = '2.0.0';
const BASE_URL = 'https://storage.googleapis.com/ruvector-releases';
interface DownloadItem {
platform: string;
icon: string;
file: string;
size: string;
ext: string;
desc: string;
}
const DOWNLOADS: DownloadItem[] = [
{
platform: 'Windows',
icon: ' ',
file: `ruvector-${VERSION}-x64.exe`,
size: '~12 MB',
ext: '.exe',
desc: 'Windows 10/11 (x64) installer with bundled WASM runtime',
},
{
platform: 'macOS',
icon: ' ',
file: `RuVector-${VERSION}.dmg`,
size: '~14 MB',
ext: '.dmg',
desc: 'macOS 12+ (Apple Silicon & Intel) disk image',
},
{
platform: 'Linux',
icon: ' ',
file: `ruvector-${VERSION}-linux-x64.tar.gz`,
size: '~10 MB',
ext: '.tar.gz',
desc: 'Linux (x86_64) tarball — Ubuntu 20+, Debian 11+, Fedora 36+',
},
];
export class DownloadView {
private container: HTMLElement | null = null;
mount(container: HTMLElement): void {
this.container = container;
const wrapper = document.createElement('div');
wrapper.style.cssText = 'max-width:960px;margin:0 auto;padding:32px 24px;overflow-y:auto;height:100%';
container.appendChild(wrapper);
// Hero
const hero = document.createElement('div');
hero.style.cssText = 'text-align:center;margin-bottom:40px';
hero.innerHTML = `
RuVector
Download the Causal Atlas runtime — a single binary that reads .rvf files,
runs the WASM solver, serves the Three.js dashboard, and verifies the Ed25519 witness chain.
v${VERSION}
Stable
ADR-040
`;
wrapper.appendChild(hero);
// Download cards
const grid = document.createElement('div');
grid.style.cssText = 'display:grid;grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));gap:16px;margin-bottom:40px';
wrapper.appendChild(grid);
for (const dl of DOWNLOADS) {
const card = document.createElement('div');
card.style.cssText = `
background:var(--bg-surface);border:1px solid var(--border);border-radius:8px;
padding:20px;display:flex;flex-direction:column;gap:12px;
transition:border-color 0.2s,transform 0.2s;cursor:pointer;
`;
card.addEventListener('mouseenter', () => {
card.style.borderColor = 'rgba(0,229,255,0.3)';
card.style.transform = 'translateY(-2px)';
});
card.addEventListener('mouseleave', () => {
card.style.borderColor = 'var(--border)';
card.style.transform = '';
});
card.innerHTML = `
${dl.icon}
${dl.platform}
${dl.size}
${dl.desc}
${dl.file}
Download ${dl.ext}
`;
grid.appendChild(card);
}
// npm / WASM section
const altSection = document.createElement('div');
altSection.style.cssText = 'margin-bottom:40px';
altSection.innerHTML = `
npm Packages & WASM Module
rvf-solver (npm)
npm install @ruvector/rvf-solver
NAPI-RS native bindings for Node.js — includes solver, witness chain, and policy kernel.
rvf-solver-wasm (npm)
npm install @ruvector/rvf-solver-wasm
Browser WASM module — same solver running in this dashboard. No native dependencies.
Standalone WASM
curl -O ${BASE_URL}/v${VERSION}/rvf_solver_wasm.wasm
Raw .wasm binary (172 KB). Load via WebAssembly.instantiate() — no wasm-bindgen needed.
Cargo Crate
cargo add rvf-runtime rvf-types rvf-crypto
Rust workspace crates for embedding RVF files in your own applications.
`;
wrapper.appendChild(altSection);
// Quick Start section
const quickstart = document.createElement('div');
quickstart.style.cssText = 'margin-bottom:40px';
quickstart.innerHTML = `
${this.step(1, 'Download', 'Download the installer for your platform above and run it.')}
${this.step(2, 'Open an RVF file', `
ruvector open causal_atlas.rvf
This starts the local server and opens the dashboard in your browser.
`)}
${this.step(3, 'Train the solver', 'Navigate to the Solver page and click Train or Auto-Optimize. The WASM solver learns in real time inside your browser.')}
${this.step(4, 'Run acceptance test', 'Click Acceptance to verify the solver passes the three-mode acceptance test (A/B/C). All results are recorded in the Ed25519 witness chain.')}
${this.step(5, 'Explore discoveries', `Navigate to Planets, Life, and Discover pages to explore candidate detections. Each candidate includes a full causal trace and witness proof.`)}
`;
wrapper.appendChild(quickstart);
// System requirements
const reqs = document.createElement('div');
reqs.innerHTML = `
System Requirements
Windows
Windows 10 (1903+) x64 processor 4 GB RAM 100 MB disk
macOS
macOS 12 Monterey+ Apple Silicon or Intel 4 GB RAM 100 MB disk
Linux
glibc 2.31+ x86_64 processor 4 GB RAM 100 MB disk
Binaries are hosted on Google Cloud Storage. All downloads include Ed25519 signatures for verification.
`;
wrapper.appendChild(reqs);
}
private step(n: number, title: string, detail: string): string {
return `
`;
}
unmount(): void {
this.container = null;
}
}