Skip to main content


A library for managing deno native plugin dependencies

tag Build Status license tag

Why do you need this module?

Because Deno’s plugin is not a first-class citizen, it cannot be loaded directly using import like js, ts, and json.

Deno’s plugin is compiled with other system-level languages, and cannot be compiled into one target result across multiple platforms, usually compiled into multiple platform target binaries. These binary files are usually much larger than scripts such as js/ts, so they should not be downloaded all, need to be dynamically loaded according to the platform.



The API needs to provide some plug-in information, including the name of the plugin, and the remote url of the binary file for different platforms. It is similar to an asynchronous version of Deno.openPlugin, which will automatically download the corresponding binary file according to the platform and cache it in the .deno_plugins directory of the current working directory.


import {
} from "";

const releaseUrl =

const pluginOptions: PreprareOptions = {
  name: "test_plugin",

  // Whether to output log. Optional, default is true
  // printLog: true,

  // Whether to use locally cached files. Optional, default is true
  // checkCache: true,

  // Support "http://", "https://", "file://"
  urls: {
    mac: `${releaseUrl}/libtest_plugin.dylib`,
    win: `${releaseUrl}/test_plugin.dll`,
    linux: `${releaseUrl}/`
const plugin: Deno.Plugin = await prepare(pluginOptions);
const { testSync } = plugin.ops;

const response = testSync.dispatch(new Uint8Array([116, 101, 115, 116]))!;



  • Caching binary files with URL hash (multi-version coexistence)
  • Supports downloading and decompressing .GZ files