bliss-rs/index.js

15 lines
468 B
JavaScript
Raw Normal View History

try {
module.exports = require('./index.node');
} catch {
const isLinux = process.platform === 'linux';
if (isLinux && process.arch === 'x64') {
module.exports = require('./index-x86_64-unknown-linux-gnu.node');
} else if (isLinux && process.arch === 'arm64') {
module.exports = require('./index-aarch64-unknown-linux-gnu.node');
} else {
throw new Error('Bliss: unsupported architecture');
}
}
export const { analyze, analyzeSync } = module;