# What changed in napi-build

> 18 changes in napi-build 1 to 2 from its official release notes, upgrade guides and advisories: 4 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-11-23. HTML: https://unstale.sh/cargo/napi-build/

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

## napi-build 2

### Breaking changes

- The required Rust version was bumped, affecting which Rust toolchain developers need to build the project. (2.2.4) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.2.4)

### New APIs and options

- The MultiThread flavor is available on wasm32-wasip1-threads. (2.5.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.6.0), [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.5.0)
- The build now exports emnapi_thread_crashed. (2.2.4) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.2.4)

### Behavior and default changes

- napi symbols are loaded at runtime on all platforms using libloading. (2.3.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.3.0)

### Tooling

- The CLI now supports non-threaded WASI targets. (2.4.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.4.0)

### Fixes and other changes

- AsyncTask completion is guarded against environment teardown. (2.4.4) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.4.4)
- Outstanding async work is drained before a WASI binding is disposed. (2.4.3) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.4.3)
- Fixed linking wasm32-wasip1-threads with wasi-sdk 34 and Rust nightly. (2.4.2) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.4.2)
- Addons with live native code are no longer unloaded. (2.4.1) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.4.1)
- Non-Error rejections are preserved. (2.4.1) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.4.1)
- A wasm teardown barrier is added. (2.4.1) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.4.1)
- On OpenBSD, the linker flag works around a local thread storage destructor crash after DSO unloading. (2.3.2) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.3.2)
- Restores undefined symbols lookup behavior during builds. (2.3.1) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/napi-build-v2.3.1)

## napi-build 1

### Breaking changes

- Task::compute now takes a mutable reference to self instead of an immutable reference. (1.0.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/1.0.0)
- The old module registration approach is replaced by the module_exports attribute on an init function. (1.0.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/1.0.0)
- Task::resolve now consumes self and takes Env by value rather than borrowing both. (1.0.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/1.0.0)

### New APIs and options

- Module initialization uses the module_exports attribute on an init function that receives JsObject exports, optionally with Env. (1.0.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/1.0.0)
- Task gains a default reject method that returns the supplied error. (1.0.0) — [release notes](https://github.com/napi-rs/napi-rs/releases/tag/1.0.0)
