UNPKG

mcard-js

Version:

MCard - Content-addressable storage with cryptographic hashing, handle resolution, and vector search for Node.js and browsers

16 lines 566 B
/** * Binary runtime executor. * * Executes compiled binaries (Rust, C) via subprocess. */ import * as path from 'path'; import { execFile, parseOutput } from './base.js'; export class BinaryRuntime { async execute(binaryPath, context, config, chapterDir) { const fullPath = path.resolve(chapterDir, binaryPath); const contextStr = typeof context === 'string' ? context : JSON.stringify(context); const { stdout } = await execFile(fullPath, [contextStr]); return parseOutput(stdout); } } //# sourceMappingURL=binary.js.map