@napi-rs/cli 3.8.3 → 3.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -50,10 +50,13 @@ if (dispose) {
50
50
  The symbol is present only when the loaded binding is WASI. Browser WASI
51
51
  loaders expose it on their default export. Disposal releases the instance: it
52
52
  destroys the emnapi context and then terminates the workers owned by that
53
- binding. Pending napi-rs runtime promises are settled or cancelled first only
54
- when the binary exports the `napi_prepare_wasm_env_cleanup` preparation hook
55
- (a planned napi-side follow-up); otherwise they may remain pending forever,
56
- so settle in-flight work before disposing. Concurrent calls share one
53
+ binding. Before that, the loader calls the binary's
54
+ `napi_prepare_wasm_env_cleanup` preparation hook, which shuts the addon's async
55
+ runtime down while the environment can still call into JavaScript. A registered
56
+ `AsyncRuntime` backend quiesces there and its cancelled tasks reject their
57
+ promises; the built-in Tokio runtime only _starts_ draining, so with it a
58
+ promise whose task is still running can still be left pending. Settle in-flight
59
+ work before disposing if that matters. Concurrent calls share one
57
60
  promise, successful disposal is idempotent, and a failed cleanup phase can be
58
61
  retried by calling the same function again. Do not call addon exports after
59
62
  disposal completes.