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:
ruv
2026-03-02 23:32:45 -05:00
parent 14902e6b4e
commit e91bb8a1d5
1600 changed files with 1852646 additions and 0 deletions
@@ -0,0 +1,59 @@
#!/usr/bin/env node
const { spawn } = require('child_process');
const path = require('path');
const os = require('os');
// Determine the platform-specific binary
const platform = os.platform();
const arch = os.arch();
let binaryName = 'temporal-solver';
if (platform === 'win32') {
binaryName += '.exe';
}
// Path to the Rust binary
const binaryPath = path.join(__dirname, '..', 'target', 'release', binaryName);
// Check if AVX2 is supported
function hasAVX2Support() {
try {
const cpuInfo = require('os').cpus()[0].model;
// This is a simple heuristic - real detection would be more complex
return !cpuInfo.includes('ARM') && !cpuInfo.includes('Apple M');
} catch {
return false;
}
}
// Spawn the Rust binary with arguments
const args = process.argv.slice(2);
// Add performance flags based on CPU capabilities
if (hasAVX2Support()) {
console.log('✅ AVX2 support detected - using optimized path');
} else {
console.log('⚠️ AVX2 not detected - using fallback implementation');
}
const child = spawn(binaryPath, args, {
stdio: 'inherit',
env: {
...process.env,
RUST_BACKTRACE: '1'
}
});
child.on('error', (err) => {
if (err.code === 'ENOENT') {
console.error('❌ Binary not found. Please run: npm run build');
process.exit(1);
}
console.error('Error:', err);
process.exit(1);
});
child.on('exit', (code) => {
process.exit(code || 0);
});