Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

DjDeveloperr/deno_ffi

Repository files navigation

Archived: Deno has built-in FFI now and plugins are removed.

Deno FFI

Plugin to call dynamic library functions in Deno.

Usage

import { Library } from "https://deno.land/x/deno_ffi@0.0.5/mod.ts";

const lib = new Library("path/to/file.(so|dll|dylib)", {
  add: {
    params: ["i32", "i32"],
    returns: "i32",
  },
});

console.log("add", lib.call("add", 1, 2));

License

Check LICENSE for more info.

Copyright 2021 @ DjDeveloperr