File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 1- import { type ConvertFns , type Library } from "bun:ffi" ;
2- import { openLibrary , FFIFunction } from "@chainsafe/bun-ffi-z" ;
3-
4- // import { dlopen } from "bun:ffi";
5- // import { getBinaryName, getPrebuiltBinaryPath } from "../utils/index.js";
6-
7- // const binaryName = getBinaryName();
8- // const binaryPath = getPrebuiltBinaryPath(binaryName);
9-
10- // export const binding = lib.symbols;
11-
12- // export async function init(): Promise<Record<string, FFIFunction>> {
1+ import { type ConvertFns } from "bun:ffi" ;
2+ import { openLibrary } from "@chainsafe/bun-ffi-z" ;
3+ import path from "node:path" ;
134
145const fns = {
156 createPubkeyIndexMap : {
@@ -127,7 +118,7 @@ const fns = {
127118let binding : ConvertFns < typeof fns > | null = null ;
128119
129120// Load the compiled Zig shared library
130- const libPromise = await openLibrary ( import . meta . dirname , fns ) ;
121+ const libPromise = await openLibrary ( path . resolve ( "../bun" ) , fns ) ;
131122
132123export async function initBinding ( ) : Promise < void > {
133124 const lib = await libPromise ;
You can’t perform that action at this time.
0 commit comments