# What changed in @napi-rs/wasm-runtime

> 26 changes in @napi-rs/wasm-runtime 3 from its official release notes, upgrade guides and advisories: 24 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-11-03. HTML: https://unstale.sh/npm/@napi-rs/wasm-runtime/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @napi-rs/wasm-runtime 3

### Breaking changes

- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- The --cargo-cwd flag is removed; use --manifest-path to point at the crate's Cargo.toml. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- The --cargo-flags option is removed; pass flags to cargo build after --. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- In v3, path flags are resolved relative to --cwd or process.cwd(), instead of --cargo-cwd or process.cwd(). (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- Replaces the create-npm-dir command; the notes recommend creating npm/* directories in CI rather than committing them. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- Use napi_derive::module_init in place of napi::module_init. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- Replaces the #[module_exports] macro from compat-mode and lets projects use only the modern #[napi] macros. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- Replaces the napi universal command. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- Move the package name from napi.package.name to napi.packageName; v3 does not read the old nested field. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- Use a flat targets array listing every target explicitly, including former defaults; the CLI still reads napi.triples for compatibility. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- 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. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- This API is behind the compat-mode feature in v3; migrate to the new APIs or enable compat-mode as an escape hatch. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- Rust 1.88 or newer is required. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- The API has been totally rewritten, replacing its ref-count lifecycle with ownership-based behavior. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)

### New APIs and options

- Enable the feature to keep using deprecated types while migrating incrementally; the notes caution against permanent use because those types have known safety issues. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
- 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. (3.0.0) — [upgrade guide](https://napi.rs/docs/more/v2-v3-migration-guide)
