bliss-js/index.js
2024-05-24 19:23:29 +03:00

14 lines
420 B
JavaScript

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');
}
}