@emnapi/runtime
1.11.3 · 25 Jul 2026MIT145.1M / weekRepositoryHomepagenpmAtom feed
51 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x · latest line
1.11.3
25 Jul 2026runtime: Define deferred state as own properties
Refresh memory views after unshared memory growth (v1.x backport)
1.11.2
3 Jul 2026Bind captured setImmediate to the global receiver
1.11.1
13 Jun 2026Refresh stale shared memory buffer before atomic access (v1.x backport)
1.11.0
8 Jun 2026Add napi_create_external_sharedarraybuffer
Support SharedArrayBuffer in napi_create_typedarray
What's Changed
Add napi_create_external_sharedarraybuffer
Support SharedArrayBuffer in napi_create_typedarray
1.10.0
16 Apr 2026- Breaking
napi_adjust_external_memoryno longer grow wasm memory Early update wasm memory for views (github.com/hardfist/emnapi-shared-memory-grow-r…)
Add missing
from64wrap
What's Changed
Early update wasm memory for views (github.com/hardfist/emnapi-shared-memory-grow-r…)
- Breaking
napi_adjust_external_memoryno longer grow wasm memory Add missing
from64wrapCoalesce tsfn (js version) send message
Thanks @hardfist
1.9.2
2 Apr 2026Allow maximum memory 4GB
1.9.0
12 Mar 2026Fix data race and use-after-free in napi_threadsafe_function
Rename node_api_create_object_with_properties
Execute tsfn finalizer after queue drains when aborted
What's Changed
Fix data race and use-after-free in napi_threadsafe_function
fix tsfn not work in JS based async_work workers
fix pthread_create not work in JS based async_work workers
emnapi_basic[-mt].a includes libuv symbols now
Rename node_api_create_object_with_properties
Execute tsfn finalizer after queue drains when aborted
Add required config hint in package entry
const { requiredConfig } = require('emnapi') console.log(requiredConfig.clang.wasmld)[ '--import-memory', '--shared-memory', '--export-table', '--export=malloc', '--export=free', '--export=napi_register_wasm_v1', '--export-if-defined=node_api_module_get_api_version_v1', '--export=emnapi_thread_crashed', '--export-if-defined=emnapi_async_worker_create', '--export-if-defined=emnapi_async_worker_init' ]
1.8.1
4 Jan 2026Add support for Float16Array
1.8.0
3 Jan 2026Add node_api_set_prototype
1.7.1
14 Nov 2025Move Node-API version detection
Support SharedArrayBuffer in napi_create_dataview
1.7.0
3 Nov 2025Add napi_create_object_with_properties method
1.6.0
21 Oct 2025Added SharedArrayBuffer api
Make napi_delete_reference use node_api_basic_env
What's Changed
Added SharedArrayBuffer api
Make napi_delete_reference use node_api_basic_env
1.5.0
29 Aug 2025Env undefined after emitting beforeExit event
wasi: Avoid deadlock caused by child thread abort when the main thread is in
Atomics.waitand allow blocking calls on browser main thread (requires wasi-sdk 26+ and--export=emnapi_thread_crashed)
What's Changed
Prebuilt libraries are built by LLVM clang 20.
Env undefined after emitting beforeExit event
wasi: Avoid deadlock caused by child thread abort when the main thread is in
Atomics.waitand allow blocking calls on browser main thread (requires wasi-sdk 26+ and--export=emnapi_thread_crashed)
1.4.5
18 Jul 2025wasm32-wasip1-threads: Process never exit if trap in threads
1.4.4
7 Jul 2025Worker.onerror may receive an Event
1.4.3
15 Apr 2025Update @emnapi/wasi-threads@1.0.2 in the package.json dependency of @emnapi/core
1.4.2
15 Apr 2025Check SharedArrayBuffer
1.4.1
12 Apr 2025Add checks for message channel usage in web runtime
1.4.0
28 Mar 2025Allow napi_delete_reference in basic finalizers
Define NAPI_VERSION 10
Reduce the overhead of binding function call (1.5x faster)
1.3.1
12 Oct 2024napi_is_buffer(Uint8Array)should returntrueAdd napi_create_buffer_from_arraybuffer
1.3.0
4 Oct 2024Add
suppressDestroyto contextUpdate libuv source
Add support for UTF-8 and Latin-1 property keys
What's Changed
Add
suppressDestroyto contextUpdate libuv source
Add support for UTF-8 and Latin-1 property keys
1.2.0
19 May 2024Pthread worker leak
Gyp add OS
wasmaliasAdd new option to allow waiting thread start before thread-spawn return
What's Changed
Pthread worker leak
Gyp add OS
wasmaliasAdd new option to allow waiting thread start before thread-spawn return
Separate
@emnapi/wasi-threadspackageRespect user specified Buffer
reuseWorkerstrict mode
1.1.1
29 Mar 2024npm@10.4.0+ will run node-gyp rebuild
1.1.0
20 Mar 2024Segregate nogc APIs from rest via type system
Missing sources in gyp wasi + threads target
What's Changed
Segregate nogc APIs from rest via type system
Missing sources in gyp wasi + threads target
1.0.0
29 Jan 2024Improve
getUnsharedTextDecoderViewAdd a prepare script
Truncate number in
napi_get_value_{int32,uint32,int64}
What's Changed
Improve
getUnsharedTextDecoderViewAdd a prepare script
Truncate number in
napi_get_value_{int32,uint32,int64}Add basic gyp support
Breaking Changes
The headers location is changed from
node_modules/emnapi/includetonode_modules/emnapi/include/node# new emcc ... -Inode_modules/emnapi/include/node
- 0.45.x
0.45.0
29 Dec 2023feat: separate transformer packages
fix: incorrect result of
napi_create_bigint_uint64when the input is greater than0x7ffffffffffffffffeat: add
node_api_create_property_key_utf16as a alias ofnapi_create_string_utf16
What's Changed
feat: separate transformer packages
fix: incorrect result of
napi_create_bigint_uint64when the input is greater than0x7ffffffffffffffffeat: add
node_api_create_property_key_utf16as a alias ofnapi_create_string_utf16build: prebuilt library is built by LLVM 17 (wasi-sdk-21 & emscripten 3.1.44)
Engineering
refactor: allow macros defined in source code
refactor: factor out common code into macros
refactor: migrate to ESM
refactor: improve TypeScript custom transformers
- 0.44.x
0.44.0
12 Nov 2023- Breaking
emnapi_get_emscripten_versionhas been removed, use__EMSCRIPTEN_{major,minor,tiny}__instead. - Breaking
Require node-api-headers as a dependency
- Breaking
Users should always define
-DBUILDING_NODE_EXTENSION
What's Changed
Delay injecting HEAP_DATA_VIEW declaration
Move
napi_adjust_external_memoryto JSSync latest headers
Add
EMNAPI_{MAJOR,MINOR,PATCH}_VERSIONandemnapi_get_runtime_version
Breaking Changes
- Breaking
emnapi_get_emscripten_versionhas been removed, use__EMSCRIPTEN_{major,minor,tiny}__instead.
Possible upcoming breaking changes in the future
- Breaking
Require node-api-headers as a dependency
- Breaking
Users should always define
-DBUILDING_NODE_EXTENSION - Breaking
Emscripten users should define
-DNAPI_EXTERN=__attribute__((__import_module__("env")))manually sincenapiis the default module where Node.js wants to import symbols from. See #20035
- 0.43.x
0.43.1
21 Oct 2023Fix duplicated symbol __copy_tls in LLVM 17
Wasi threads max tid should be 0x1FFFFFFF
Throw error with friendly message if symbols are not exported
0.43.0
20 Oct 2023- Breaking
If you are using
emnapi.h, it should be included after includingjs_native_api.hornode_api.h+ #include <js_native_api.h> // or #include <node_api.h> #include <emnapi.h>
- Breaking
onCreateWorker(info: { type: 'pthread' | 'async-work' })has been changed toonCreateWorker(info: { type: 'thread' | 'async-work' })const { instantiateNapiModule } = require('@emnapi/core') instantiateNapiModule({ // ... onCreateWorker ({ type }) { - if (type === 'pthread') { + if (type === 'thread') { // ... } } }) Enable uncaught exceptions policy by default
What's Changed
Enable uncaught exceptions policy by default
Run finalizers directly from GC
Add missing
CHECK_ARG(env, cbinfo);tonapi_create_functionandnapi_get_new_targetWrap
napi_get_array_lengthandnapi_get_prototypewith PREAMBLEDo not include
js_native_api.hinemnapi.h
Breaking Changes
- Breaking
If you are using
emnapi.h, it should be included after includingjs_native_api.hornode_api.h+ #include <js_native_api.h> // or #include <node_api.h> #include <emnapi.h>
- Breaking
onCreateWorker(info: { type: 'pthread' | 'async-work' })has been changed toonCreateWorker(info: { type: 'thread' | 'async-work' })const { instantiateNapiModule } = require('@emnapi/core') instantiateNapiModule({ // ... onCreateWorker ({ type }) { - if (type === 'pthread') { + if (type === 'thread') { // ... } } })
- 0.42.x
0.42.0
16 Sep 2023Rename internal
NAPI_VERSIONdefinitionFix package types exports thanks to attw
Use
-fno-strict-aliasingfor emmalloc
What's Changed
Rename internal
NAPI_VERSIONdefinitionFix package types exports thanks to attw
Use
-fno-strict-aliasingfor emmallocReturn
napi_generic_failureinstead of throwing if runtime has noBigIntRepresent
napi_callback_infowith non-zero numberFix import namespace of
_emnapi_async_work_pool_sizeFix uncaught exceptions policy
- 0.41.x
0.41.0
24 Jun 2023Expose threadpool cleanup
- 0.40.x
0.40.0
17 Jun 2023Implement experimental
node_api_create_external_string_*Drop
ts-macrosto fix broken output code
- 0.39.x
0.39.0
5 Jun 2023Get Node API version used by addon
callIntoModuleforce uncaught exceptionAdd status napi_cannot_run_js
What's Changed
Get Node API version used by addon
callIntoModuleforce uncaught exceptionAdd status napi_cannot_run_js
Define version 9
- 0.38.x
0.38.3
6 May 2023Fix MessageChannel undefined
What's Changed
Fix MessageChannel undefined
0.38.2
24 Apr 2023Check
NAPI_VERSIONafter#include "node_api.h"
0.38.1
24 Apr 2023Fix compilation error when defining
NAPI_VERSION < 8
What's Changed
Fix compilation error when defining
NAPI_VERSION < 8
0.38.0
21 Apr 2023- Breaking
No longer ship modified node-addon-api headers
Fix
emnapi_sync_memorysignatureDecode small UTF8 string
What's Changed
Fix
emnapi_sync_memorysignatureDecode small UTF8 string
- Breaking
No longer ship modified node-addon-api headers
Users who use node-addon-api need to
npm install node-addon-apiand then manually add node-addon-api package path to the compiler include directories, via-I/include_directories()/target_include_directories()/cmake -DEMNAPI_FIND_NODE_ADDON_API=ON- 0.37.x
0.37.0
16 Apr 2023Make error message more friendly when Buffer is undefined
Support coming emscripten 3.1.36
Sync Node-API headers from Node.js official repo
What's Changed
Make error message more friendly when Buffer is undefined
Support coming emscripten 3.1.36
Sync Node-API headers from Node.js official repo
- 0.36.x
0.36.3
4 Apr 2023Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
0.36.2
31 Mar 2023Fix wasm32-wasi-threads prebuilt libraries missing in emnapi npm package
0.36.1
31 Mar 2023Prebuild wasm32-wasi-threads libraries
0.36.0
30 Mar 2023- Breaking
(BREAKING CHANGE) rename
onInstantiatedtobeforeInitand change function signature 8c208e4 Prebuilt library use emscripten 3.1.34
Fix prebuilt library use wrong symbol after emscripten 3.1.32 #41
What's Changed
Prebuilt library use emscripten 3.1.34
Fix prebuilt library use wrong symbol after emscripten 3.1.32 #41
Allow symbol as reference target
Allow
napi_create_string_*receiveNULLas parameter if length is set to0- Breaking
(BREAKING CHANGE) rename
onInstantiatedtobeforeInitand change function signature 8c208e4
- 0.35.x
0.35.0
23 Mar 2023Implement multithreaded async work in JS
- 0.34.x
0.34.0
16 Mar 2023Add tsfn JS implementation so that tsfn can be used with
libemnapi-basic.a
- 0.33.x
0.33.1
9 Mar 2023small fix
0.33.0
9 Mar 2023Support
wasm32-wasi-threadsAdd new API for non-emscripten
- 0.32.x
0.32.2
25 Feb 2023Fix
SyntaxErrorwhen using keywords as namePrebuild
libemnapi-basic.a(excludenapi_*_{async_work,threadsafe_function}) and implement async work in single thread
Fix
SyntaxErrorwhen using keywords as namePrebuild
libemnapi-basic.a(excludenapi_*_{async_work,threadsafe_function}) and implement async work in single thread
Breaking Change
(non-emscripten) Now
napiModule.initreceive an object as first parameter and require aWebAssembly.Moduleinmodulefield.before:
import { createNapiModule } from '@emnapi/core' const napiModule = createNapiModule({ /* ... */ }) WebAssembly.instantiate(/* ... */).then(({ instance }) => { const binding = napiModule.init(instance, memory, table) })after:
import { createNapiModule } from '@emnapi/core' const napiModule = createNapiModule({ /* ... */ }) WebAssembly.instantiate(/* ... */).then(({ instance, module }) => { const binding = napiModule.init({ instance, module, memory, table }) })
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.