NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1000 most downloaded on npm
emnapi core
Last release 1 months ago
04 Sep 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 48 of 49 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
54 releases · first in 2023
One column per quarter.
fix: fail fast on terminal worker errors by @toyobayashi in #235
Full Changelog: v2.0.0-alpha.4...v2.0.0-alpha.5
test: experiment vitest by @toyobayashi in #228
Full Changelog: v2.0.0-alpha.3...v2.0.0-alpha.4
fix: refresh stale shared memory buffer before atomic access in TSFN / MT async work by @Brooooooklyn in #219
Full Changelog: v2.0.0-alpha.2...v2.0.0-alpha.3
refactor: remove use of PThread.runningWorkers by @toyobayashi in #216
Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.2
Deprecated JS version implementation of async work and TSFN, switched to libuv threadpool based implementation by default
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.10.0...v2.0.0-alpha.1
fix(runtime): define deferred state as own properties by @Brooooooklyn in #223
Full Changelog: v1.11.2...v1.11.3
fix: bind captured setImmediate to the global receiver by @Brooooooklyn in #221
Full Changelog: v1.11.1...v1.11.2
fix: refresh stale shared memory buffer before atomic access (v1.x backport) by @Brooooooklyn in #218
Full Changelog: v1.11.0...v1.11.1
feat: add napi_create_external_sharedarraybuffer
fix: early update wasm memory for views
napi_adjust_external_memory no longer grow wasm memoryfrom64 wrapThanks @hardfist
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.9.2...v1.10.0
fix: allow maximum memory 4GB by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/205
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.9.1...v1.9.2
fix for emscripten 5.0.3 https://github.com/emscripten-core/emscripten/commit/30517257796a28976afb5d2aceff79f07def2328
fix for emscripten 5.0.3 https://github.com/emscripten-core/emscripten/commit/30517257796a28976afb5d2aceff79f07def2328
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.9.0...v1.9.1
fix data race and use-after-free in napi_threadsafe_function by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/199
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'
]
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.8.1...v1.9.0
feat: add support for Float16Array by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/190
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.8.0...v1.8.1
feat: add node_api_set_prototype by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/188
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.7.1...v1.8.0
move Node-API version detection by @toyobayashi in #182
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.7.0...v1.7.1
feat: add napi_create_object_with_properties method by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/181
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.6.0...v1.7.0
feat: added SharedArrayBuffer api by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/171
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.5.0...v1.6.0
Prebuilt libraries are built by LLVM clang 20.
Prebuilt libraries are built by LLVM clang 20.
Atomics.wait and allow blocking calls on browser main thread (requires wasi-sdk 26+ and --export=emnapi_thread_crashed) by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/163Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.4.5...v1.5.0
fix(wasm32-wasip1-threads): process never exit if trap in threads
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.4.4...v1.4.5
fix: worker.onerror may receive an Event
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.4.3...v1.4.4
update @emnapi/wasi-threads@1.0.2 in the package.json dependency of @emnapi/core
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.4.2...v1.4.3
fix: check SharedArrayBuffer by @toyobayashi in #144
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.4.1...v1.4.2
add checks for message channel usage in web runtime by @gvkhna in #142
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.4.0...v1.4.1
allow napi_delete_reference in basic finalizers
If you are using Emscripten >= 3.1.60, please manually specify the link option -sEXPORTED_RUNTIME_METHODS=['emnapiInit'] (#131) (https://github.com/emscripten-core/emscripten/issues/23057)
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.3.1...v1.4.0
fix: napi_is_buffer(Uint8Array) should return true by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/129
napi_is_buffer(Uint8Array) should return true by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/129Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.3.0...v1.3.1
feat: add suppressDestroy to context by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/124
suppressDestroy to context by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/124Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.2.0...v1.3.0
test: store external type tags by value by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/114
wasm alias by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/113@emnapi/wasi-threads package by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/117wasm32-wasip1[-threads] targets and use LLVM 18 to build libraries by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/119reuseWorker strict mode by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/120Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.1.1...v1.2.0
fix: npm@10.4.0+ will run node-gyp rebuild
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.1.0...v1.1.1
test: make napi_get_buffer_info check if passed buffer is valid by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/108
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v1.0.0...v1.1.0
refactor: migrate @emnapi/core to typescript by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/100
@emnapi/core to typescript by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/100getUnsharedTextDecoderView by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/101napi_get_value_{int32,uint32,int64} by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/105wasm64-emscripten prebuilt libraries by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/106The headers location is changed from node_modules/emnapi/include to node_modules/emnapi/include/node
# old
# emcc ... -Inode_modules/emnapi/include
# new
emcc ... -Inode_modules/emnapi/include/node
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.45.0...v1.0.0
feat: separate transformer packages by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/94
feat: separate transformer packages by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/94
fix: incorrect result of napi_create_bigint_uint64 when the input is greater than 0x7fffffffffffffff by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/98
feat: add node_api_create_property_key_utf16 as a alias of napi_create_string_utf16 by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/95
build: prebuilt library is built by LLVM 17 (wasi-sdk-21 & emscripten 3.1.44) by @toyobayashi in 2da3e2b
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.44.0...v0.45.0
test: return napi_exception_pending on throwing proxy handlers by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/75
napi_adjust_external_memory to JS by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/87EMNAPI_{MAJOR,MINOR,PATCH}_VERSION and emnapi_get_runtime_version by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/89emnapi_get_emscripten_version has been removed, use __EMSCRIPTEN_{major,minor,tiny}__ instead.-DBUILDING_NODE_EXTENSION-DNAPI_EXTERN=__attribute__((__import_module__("env"))) manually since napi is the default module where Node.js wants to import symbols from. See https://github.com/emscripten-core/emscripten/issues/20035Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.43.1...v0.44.0
fix duplicated symbol __copy_tls in LLVM 17 by @toyobayashi
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.43.0...v0.43.1
enable uncaught exceptions policy by default by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/81
CHECK_ARG(env, cbinfo); to napi_create_function and napi_get_new_target by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/82napi_get_array_length and napi_get_prototype with PREAMBLE by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/83js_native_api.h in emnapi.h by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/86If you are using emnapi.h, it should be included after including js_native_api.h or node_api.h
+ #include <js_native_api.h> // or #include <node_api.h>
#include <emnapi.h>
[non-emscripten] onCreateWorker(info: { type: 'pthread' | 'async-work' }) has been changed to onCreateWorker(info: { type: 'thread' | 'async-work' })
const { instantiateNapiModule } = require('@emnapi/core')
instantiateNapiModule({
// ...
onCreateWorker ({ type }) {
- if (type === 'pthread') {
+ if (type === 'thread') {
// ...
}
}
})
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.42.0...v0.43.0
rename internal NAPI_VERSION definition by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/71
NAPI_VERSION definition by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/71-fno-strict-aliasing for emmalloc by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/74napi_generic_failure instead of throwing if runtime has no BigInt by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/76UV_THREADPOOL_SIZE by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/77napi_callback_info with non-zero number by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/78_emnapi_async_work_pool_size (8d4e9e3)Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.41.0...v0.42.0
Expose threadpool cleanup by @RReverser in https://github.com/toyobayashi/emnapi/pull/73
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.40.0...v0.41.0
implement experimental node_api_create_external_string_* by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/68
node_api_create_external_string_* by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/68ts-macros to fix broken output code by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/69Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.39.0...v0.40.0
get Node API version used by addon by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/64
callIntoModule force uncaught exception by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/65Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.38.3...v0.39.0
test: passing NULL to napi_define_class by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/62
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.38.2...v0.38.3
check NAPI_VERSION after #include "node_api.h" by @toyobayashi in 9b41404
NAPI_VERSION after #include "node_api.h" by @toyobayashi in 9b41404Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.38.1...v0.38.2
test: passing NULL to number APIs by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/58
NAPI_VERSION < 8 by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/60Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.38.0...v0.38.1
BREAKING CHANGE: no longer ship modified node-addon-api headers by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/57
emnapi_sync_memory signature by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/55Users who use node-addon-api need to npm install node-addon-api and 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
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.37.0...v0.38.0
test: extend type-tagging to externals by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/51
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.36.3...v0.37.0
refactor: use local string helper instead of emscripten's runtime methods (support emscripten 3.1.35) by @toyobayashi in https://github.com/toyobayash
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.36.2...v0.36.3
fix wasm32-wasi-threads prebuilt libraries missing in emnapi npm package
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.36.1...v0.36.2
prebuild wasm32-wasi-threads libraries by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/44
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.36.0...v0.36.1
(BREAKING CHANGE) rename onInstantiated to beforeInit and change function signature 8c208e4f896c2a77d9ee211787d796af5d690c04
napi_create_string_* receive NULL as parameter if length is set to 0 in https://github.com/toyobayashi/emnapi/pull/43onInstantiated to beforeInit and change function signature 8c208e4f896c2a77d9ee211787d796af5d690c04Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.35.0...v0.36.0
Implement multithreaded async work in JS by @toyobayashi in https://github.com/toyobayashi/emnapi/pull/40
Full Changelog: https://github.com/toyobayashi/emnapi/compare/v0.34.0...v0.35.0
Add tsfn JS implementation so that tsfn can be used with libemnapi-basic.a
libemnapi-basic.ahttps://github.com/toyobayashi/emnapi/compare/v0.33.1...v0.34.0
Nothing published for this version
emnapiCore.instantiateNapiModule
wasm32-wasi-threads (#34)emnapiCore.instantiateNapiModuleemnapiCore.instantiateNapiModuleSyncemnapiCore.MessageHandlerfix SyntaxError when using keywords as name
SyntaxError when using keywords as name (#36)libemnapi-basic.a (exclude napi_*_{async_work,threadsafe_function}) and implement async work in single thread (#37)(non-emscripten) Now napiModule.init receive an object as first parameter and require a WebAssembly.Module in module field.
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
})
})
Rename package name (#33), old packages are deprecated and no longer update
napi_*_callback_scope for node-addon-api #32Rename package name (#33), old packages are deprecated and no longer update
| Before | After |
|---|---|
@tybys/emnapi |
emnapi |
@tybys/emnapi-runtime |
@emnapi/runtime |
@tybys/emnapi-core |
@emnapi/core |
@tybys/emnapi-node-binding |
@emnapi/node-binding |
Your coding agent can read these notes before it upgrades. Set up the MCP server →