deno_bindgen icon indicating copy to clipboard operation
deno_bindgen copied to clipboard

The ".dll" cache loaded by FFI cannot be cleared

Open idranme opened this issue 2 years ago • 4 comments

// Auto-generated with deno_bindgen
import { CachePolicy, prepare } from "https://deno.land/x/[email protected]/plug.ts"
const opts = {
  name: "teyda_core",
  url: (new URL("../target/release", import.meta.url)).toString(),
  policy: undefined,
}
const _lib = await prepare(opts, {
  core_run: { parameters: [], result: "void", nonblocking: false },
  mh: { parameters: ["pointer", "usize"], result: "void", nonblocking: false },
})

export function test() {
  let rawResult = _lib.symbols.core_run()
  const result = rawResult
  return result
}

idranme avatar May 01 '22 15:05 idranme

Deno does not cache FFI libraries. Are you using deno_bindgen?

littledivy avatar May 01 '22 15:05 littledivy

Deno does not cache FFI libraries. Are you using deno_bindgen?

yes

idranme avatar May 01 '22 15:05 idranme

Related: https://github.com/denoland/deno_bindgen/issues/57

As a workaround, you can manually clear from the OS cache directory.

littledivy avatar May 01 '22 16:05 littledivy

Related: #57

As a workaround, you can manually clear from the OS cache directory.

okey, thanks

idranme avatar May 01 '22 16:05 idranme