loadBinding

Load @wvb/node's native binding.

Load @wvb/node's native binding.

dirOrFile is either:

  • a directory: loadBinding picks the <binaryName>.<target>.node file inside it that matches the current process.platform/process.arch (the same per-target names binding.cjs resolves), e.g. wvb-node.darwin-arm64.node; or
  • a .node file: it is loaded directly.
import { loadBinding } from '@wvb/node/binding';

const wvbNode = loadBinding(nodeBindingsDir);
const source = new wvbNode.Source({ builtinDir, remoteDir });

View source ↗

function loadBinding(dirOrFile: string): __module;

Parameters

Prop

Type

Returns

__module

On this page