mirror of
https://github.com/ruvnet/RuView
synced 2026-08-09 20:21:43 +00:00
feat: vendor midstream and sublinear-time-solver libraries
Add ruvnet/midstream (AIMDS real-time inference) and ruvnet/sublinear-time-solver (sublinear optimization algorithms) as vendored dependencies under vendor/. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const wasm = require('./wasm/strange_loop.js');
|
||||
|
||||
console.log('Testing fixed WASM functions...\n');
|
||||
|
||||
// Initialize
|
||||
if (wasm.init_wasm) wasm.init_wasm();
|
||||
|
||||
// Test each function
|
||||
const tests = [
|
||||
{
|
||||
name: 'Quantum Superposition',
|
||||
fn: () => wasm.quantum_superposition(3)
|
||||
},
|
||||
{
|
||||
name: 'Quantum Measurement',
|
||||
fn: () => wasm.measure_quantum_state(3)
|
||||
},
|
||||
{
|
||||
name: 'Nano Swarm',
|
||||
fn: () => wasm.create_nano_swarm(100)
|
||||
},
|
||||
{
|
||||
name: 'Run Swarm Ticks',
|
||||
fn: () => wasm.run_swarm_ticks(10)
|
||||
},
|
||||
{
|
||||
name: 'Sublinear Solver',
|
||||
fn: () => wasm.solve_linear_system_sublinear(1000, 0.001)
|
||||
},
|
||||
{
|
||||
name: 'Consciousness Evolution',
|
||||
fn: () => wasm.evolve_consciousness(100)
|
||||
},
|
||||
{
|
||||
name: 'Temporal Prediction',
|
||||
fn: () => wasm.predict_future_state(42.0, 1000)
|
||||
},
|
||||
{
|
||||
name: 'Lorenz Attractor',
|
||||
fn: () => wasm.create_lorenz_attractor(10, 28, 8/3)
|
||||
},
|
||||
{
|
||||
name: 'Calculate Phi',
|
||||
fn: () => wasm.calculate_phi(50, 200)
|
||||
}
|
||||
];
|
||||
|
||||
let passed = 0;
|
||||
let failed = 0;
|
||||
|
||||
for (const test of tests) {
|
||||
try {
|
||||
const result = test.fn();
|
||||
console.log(`✅ ${test.name}: ${String(result).substring(0, 60)}...`);
|
||||
passed++;
|
||||
} catch (e) {
|
||||
console.log(`❌ ${test.name}: ${e.message}`);
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`\n========================================`);
|
||||
console.log(`Results: ${passed} passed, ${failed} failed`);
|
||||
|
||||
if (failed === 0) {
|
||||
console.log('🎉 All functions work without crashes!');
|
||||
} else {
|
||||
console.log(`⚠️ ${failed} functions still have issues.`);
|
||||
}
|
||||
Reference in New Issue
Block a user