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

@napi-rs/cli

v3.8.6

Published

Cli tools for napi-rs

Readme

@napi-rs/cli

Download Install size

Cli tools for napi-rs

# or npm, pnpm
yarn add @napi-rs/cli -D
yarn napi build

Requirements

@napi-rs/cli supports Node.js ^20.17.0, ^22.13.0, and >=23.5.0. Earlier Node.js releases are no longer supported by the CLI runtime.

Commands

| Command | desc | docs | | --------------- | -------------------------------------------------------------- | --------------------------------------------------- | | new | create new napi-rs project | ./docs/new.md | | build | build napi-rs project | ./docs/build.md | | create-npm-dirs | Create npm package dirs for different platforms | ./docs/create-npm-dirs | | artifacts | Copy artifacts from Github Actions into specified dir | ./docs/artifacts.md | | rename | Rename the napi-rs project | ./docs/rename.md | | universalize | Combile built binaries into one universal binary | ./docs/universalize.md | | version | Update version in created npm packages by create-npm-dirs | ./docs/version.md | | pre-publish | Update package.json and copy addons into per platform packages | ./docs/pre-publish.md |

Disposing generated WASI bindings

Generated WASI bindings expose deterministic cleanup through a non-enumerable symbol on the binding object:

const binding = require('<package>')
const dispose = binding[Symbol.for('napi.rs.wasi.dispose')]

if (dispose) {
  await dispose()
}

The symbol is present only when the loaded binding is WASI. Browser WASI loaders expose it on their default export. Disposal releases the instance: it destroys the emnapi context and then terminates the workers owned by that binding. Before that, the loader calls the binary's napi_prepare_wasm_env_cleanup preparation hook, which shuts the addon's async runtime down while the environment can still call into JavaScript. A registered AsyncRuntime backend quiesces there and its cancelled tasks reject their promises; the built-in Tokio runtime only starts draining, so with it a promise whose task is still running can still be left pending. Settle in-flight work before disposing if that matters. Concurrent calls share one promise, successful disposal is idempotent, and a failed cleanup phase can be retried by calling the same function again. Do not call addon exports after disposal completes.

See WASI targets and loaders for threaded, threadless, browser, and workerd packaging behavior.

Debug mode

DEBUG="napi:*" napi [command]