npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@obinexusltd/wasm-polycall

v1.0.0

Published

WebAssembly host import binding for libpolycall.

Downloads

71

Readme

wasm-polycall

@obinexusltd/wasm-polycall is the WebAssembly host-import binding for libpolycall. It is a thin adapter: WASM modules import polycall_ffi_run_config, and the JavaScript host shim maps that import to a host callback that represents polycall_ffi_run_config(config_path, 1).

libpolycall release host:

https://github.com/obinexus/libpolycall/releases#release-libpolycall-1.0.0

Install

npm install @obinexusltd/wasm-polycall

Or inspect/run the package CLI with npx:

npx @obinexusltd/wasm-polycall --help
npx @obinexusltd/wasm-polycall host-smoke
npx @obinexusltd/wasm-polycall inspect ./dist/module.wasm

Host import contract

WASM modules may import the function from either env or polycall:

(import "env" "polycall_ffi_run_config"
  (func $polycall_ffi_run_config (param i32 i32) (result i32)))

The first i32 is a pointer to a NUL-terminated UTF-8 config path in WASM linear memory. The second i32 is the libpolycall FFI mode; this adapter uses mode 1 for config execution.

JavaScript API

const {
  createPolycallHost,
  writeCString
} = require("@obinexusltd/wasm-polycall");

const memory = new WebAssembly.Memory({ initial: 1 });
const host = createPolycallHost({
  memory,
  runConfig(configPath, mode) {
    console.log({ configPath, mode });
    return mode === 1 ? 0 : 1;
  }
});

const pointer = writeCString(memory, "wasm-polycallrc", 0);
const status = host.imports.env.polycall_ffi_run_config(pointer, 1);

For compiled modules, use instantiatePolycallModule(input, options). It provides both supported import namespaces and attaches exported memory automatically when the module exports memory.

Package layout

wasm-polycall/
|-- bin/
|   `-- wasm-polycall.js
|-- dist/
|   `-- README.md
|-- examples/
|   |-- module.wat
|   `-- run.js
|-- generated/
|   `-- polycall/
|       |-- abi.json
|       `-- polycall_ffi.h
|-- src/
|   `-- wasm_polycall.js
|-- tests/
|-- index.js
|-- package.json
|-- polycall-binding.json
|-- wasm-polycallrc
`-- README.md

Verification

npm test
npm pack --dry-run --json

npm test checks package metadata, source-directory indexing, host import behavior, and the npm bin command used by npx.

Publishing

The package is configured for public scoped publishing:

npm publish --access public

License

MIT © Nnamdi Michael Okpala