unstale

cargo / napi-derive

napi-derive

What changed in napi-derive 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-23.

2 breaking1 security6 new APIs and options6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

napi-derive 315 changes

Breaking changes 2

  • The Rust version requirement was bumped.

    3.3.0release notes

  • The module initialization macro moved from napi::module_init to napi_derive::module_init because of breaking changes in the upstream ctor crate.

    3.0.0upgrade guide

Security 1

  • Classes marked with #[napi] have unforgeable identity via Node object type tags.

    3.6.0release notes

New APIs and options 6

  • Class members can use symbol_for keys.

    3.7.0release notes

  • Class members can use well-known symbol keys.

    3.7.0release notes

  • Adds the napi(async_iterator) macro attribute.

    3.5.0release notes

  • Adds a feature for debug logging NAPI function calls.

    3.4.0release notes

  • Adds discriminant_case to allow changing the case of a discriminant.

    3.3.0release notes

  • This attribute replaces the compat-mode #[module_exports] macro, allowing use of the modern #[napi] macros without the compat-mode feature.

    3.0.0upgrade guide

Fixes and other changes 6

  • The TS1016 issue in constructors is avoided.

    3.7.0release notes

  • Closures passed to define_class are freed.

    3.7.0release notes

  • Static flags are honoured.

    3.7.0release notes

  • AsyncTask completion is guarded against environment teardown.

    3.6.8release notes

  • Fixes invalid TypeScript generic syntax generated for type aliases.

    3.5.6release notes

  • Using ThreadsafeFunction::call_async no longer requires tokio.

    3.3.1release notes