Skip to content

v1.9.0

Choose a tag to compare

@github-actions github-actions released this 12 Mar 09:42
· 64 commits to main since this release

What's Changed

  • fix data race and use-after-free in napi_threadsafe_function by @toyobayashi in #199
    • 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
  • refactor: dispatch async work queue in shared memory by @toyobayashi in #200
    • Avoids deadlock when main thread block on waiting queued async work starting. Completed work can not be dispatched to main thread that cause no new worker available, then queued work never start.
    • wasm32-wasip1-threads target spawn async worker in JS will use pthread_create, no longer maintain a separate worker pool.
  • rename node_api_create_object_with_properties by @toyobayashi in #193
  • fix: execute tsfn finalizer after queue drains when aborted
  • feat: 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'
    ]
    

Full Changelog: v1.8.1...v1.9.0