diff options
author | 2022-09-09 19:45:39 -0700 | |
---|---|---|
committer | 2022-09-09 19:45:39 -0700 | |
commit | 695da9ee291c67f2e6caa547b3ef2720dde6cb6b (patch) | |
tree | 55f7a11963789779cfa72fea9694521b2a94beb5 | |
parent | d114e9040ba5815c120dc053e29da48803414c8a (diff) | |
download | bun-695da9ee291c67f2e6caa547b3ef2720dde6cb6b.tar.gz bun-695da9ee291c67f2e6caa547b3ef2720dde6cb6b.tar.zst bun-695da9ee291c67f2e6caa547b3ef2720dde6cb6b.zip |
Fix import path issue in ffi bench
-rw-r--r-- | bench/ffi/bun.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bench/ffi/bun.js b/bench/ffi/bun.js index ec086c73a..593473929 100644 --- a/bench/ffi/bun.js +++ b/bench/ffi/bun.js @@ -1,6 +1,8 @@ +import { ptr, dlopen, CString, toBuffer } from "bun:ffi"; import { run, bench, group } from "mitata"; -import { ptr, dlopen, CString } from "bun:ffi"; -const { napiNoop, napiHash, napiString } = require("./src/ffi_napi_bench.node"); + +const { napiNoop, napiHash, napiString } = require(import.meta.dir + + "/src/ffi_napi_bench.node"); const { symbols: { @@ -8,7 +10,7 @@ const { ffi_hash: { native: ffi_hash }, ffi_string: { native: ffi_string }, }, -} = dlopen("./src/ffi_napi_bench.node", { +} = dlopen(import.meta.dir + "/src/ffi_napi_bench.node", { ffi_noop: { args: [], returns: "void" }, ffi_string: { args: [], returns: "ptr" }, ffi_hash: { args: ["ptr", "u32"], returns: "u32" }, |