npm / @napi-rs/wasm-runtime
@napi-rs/wasm-runtime
What changed in @napi-rs/wasm-runtime 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-03.
24 breaking2 new APIs and options
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@napi-rs/wasm-runtime 326 changes
Breaking changes 24
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
The --cargo-cwd flag is removed; use --manifest-path to point at the crate's Cargo.toml.
The --cargo-flags option is removed; pass flags to cargo build after --.
In v3, path flags are resolved relative to --cwd or process.cwd(), instead of --cargo-cwd or process.cwd().
Replaces the create-npm-dir command; the notes recommend creating npm/* directories in CI rather than committing them.
Use napi_derive::module_init in place of napi::module_init.
Replaces the #[module_exports] macro from compat-mode and lets projects use only the modern #[napi] macros.
Replaces the napi universal command.
Move the package name from napi.package.name to napi.packageName; v3 does not read the old nested field.
Use a flat targets array listing every target explicitly, including former defaults; the CLI still reads napi.triples for compatibility.
The new @napi-rs/cli requires Node.js ^20.17.0 || ^22.13.0 || >=23.5.0 at build time; this does not change the runtime support of the shipped addon.
This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch.
Rust 1.88 or newer is required.
The API has been totally rewritten, replacing its ref-count lifecycle with ownership-based behavior.
New APIs and options 2
Enable the feature to keep using deprecated types while migrating incrementally; the notes caution against permanent use because those types have known safety issues.
Replaces napi.name as the configuration field for the binary name; the CLI still reads napi.name for compatibility, but new projects should use napi.binaryName.