Skip to content

Commit 5107ffb

Browse files
committed
fix: bun folder path
1 parent 57e2d8a commit 5107ffb

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

bun/src/binding.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
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

145
const fns = {
156
createPubkeyIndexMap: {
@@ -127,7 +118,7 @@ const fns = {
127118
let 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

132123
export async function initBinding(): Promise<void> {
133124
const lib = await libPromise;

0 commit comments

Comments
 (0)