emnapi 0.36.0 → 0.36.1

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
@@ -728,7 +728,7 @@ instantiateNapiModule(wasmBuffer, {
728
728
  ...importObject.emnapi
729
729
  }
730
730
  }
731
- }).then(({ instance, napiModule }) => {
731
+ }).then(({ napiModule }) => {
732
732
  const binding = napiModule.exports
733
733
  // output: 5
734
734
  console.log(binding.fibonacci(5))
@@ -778,16 +778,18 @@ Cross-Origin-Embedder-Policy: require-corp
778
778
  Cross-Origin-Opener-Policy: same-origin
779
779
  ```
780
780
 
781
+ If you would like to avoid `SharedArrayBuffer` and cross-origin isolation, please use B & E (link against `libemnapi-basic.a`), see the following table for more details.
782
+
781
783
  #### About Prebuilt Libraries
782
784
 
783
785
  Prebuilt libraries can be found in the `lib` directory in `emnapi` npm package.
784
786
 
785
787
  | Library | Description | `wasm32-emscripten` | `wasm32` | `wasm32-wasi` | `wasm32-wasi-threads` |
786
788
  |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|----------|---------------|-----------------------------------------|
787
- | libemnapi.a | no atomics feature.<br/><br/> no libuv port.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` always return `napi_generic_failure`. | ✅ | ✅ | ✅ | waiting wasi-sdk release thread support |
788
- | libemnapi-mt.a | atomics feature enabled.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` are based on pthread and libuv port. | ✅ | ❌ | ❌ | waiting wasi-sdk release thread support |
789
- | libemnapi-basic.a | no atomics feature.<br/><br/> no libuv port.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` are imported from JavaScript land. | ✅ | ✅ | ✅ | waiting wasi-sdk release thread support |
790
- | libemnapi-basic-mt.a | atomics feature enabled.<br/><br/> no libuv port.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` are imported from JavaScript land.<br/><br/> include `emnapi_async_worker_create` and `emnapi_async_worker_init` for WebWorker based async work implementation. | ❌ | ✅ | ✅ | waiting wasi-sdk release thread support |
789
+ | libemnapi.a | no atomics feature.<br/><br/> no libuv port.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` always return `napi_generic_failure`. | ✅ | ✅ | ✅ | |
790
+ | libemnapi-mt.a | atomics feature enabled.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` are based on pthread and libuv port. | ✅ | ❌ | ❌ | |
791
+ | libemnapi-basic.a | no atomics feature.<br/><br/> no libuv port.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` are imported from JavaScript land. | ✅ | ✅ | ✅ | |
792
+ | libemnapi-basic-mt.a | atomics feature enabled.<br/><br/> no libuv port.<br/><br/> `napi_*_async_work` and `napi_*_threadsafe_function` are imported from JavaScript land.<br/><br/> include `emnapi_async_worker_create` and `emnapi_async_worker_init` for WebWorker based async work implementation. | ❌ | ✅ | ✅ | |
791
793
  | libdlmalloc.a | no atomics feature, no thread safe garanteed. | ❌ | ✅ | ❌ | ❌ |
792
794
  | libdlmalloc-mt.a | atomics feature enabled, thread safe. | ❌ | ✅ | ❌ | ❌ |
793
795
  | libemmalloc.a | no atomics feature, no thread safe garanteed. | ❌ | ✅ | ❌ | ❌ |
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ clang version 16.0.0
2
+ Target: wasm32-unknown-wasi-threads
3
+ Thread model: posix
4
+ InstalledDir: /home/runner/work/emnapi/emnapi/wasi-sdk-20.0/bin
@@ -1,4 +1,4 @@
1
- clang version 15.0.7
1
+ clang version 16.0.0
2
2
  Target: wasm32-unknown-wasi
3
3
  Thread model: posix
4
- InstalledDir: /home/runner/work/emnapi/emnapi/wasi-sdk-19.0/bin
4
+ InstalledDir: /home/runner/work/emnapi/emnapi/wasi-sdk-20.0/bin
package/lib/wasm32.txt CHANGED
@@ -1,4 +1,4 @@
1
- clang version 15.0.7
1
+ clang version 16.0.0
2
2
  Target: wasm32
3
3
  Thread model: posix
4
- InstalledDir: /home/runner/work/emnapi/emnapi/wasi-sdk-19.0/bin
4
+ InstalledDir: /home/runner/work/emnapi/emnapi/wasi-sdk-20.0/bin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emnapi",
3
- "version": "0.36.0",
3
+ "version": "0.36.1",
4
4
  "description": "Node-API implementation for Emscripten",
5
5
  "main": "index.js",
6
6
  "devDependencies": {