Skip to content

feat(napi): tokio multi-thread mode on wasi#2501

Merged
Brooooooklyn merged 6 commits into
mainfrom
03-09-feat_napi_tokio_multi-thread_mode_on_wasi
Mar 13, 2025
Merged

feat(napi): tokio multi-thread mode on wasi#2501
Brooooooklyn merged 6 commits into
mainfrom
03-09-feat_napi_tokio_multi-thread_mode_on_wasi

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: 2058b9a Previous: 2a09690 Ratio
noop#napi-rs 85853626 ops/sec (±0.53%) 86281571 ops/sec (±0.33%) 1.00
noop#JavaScript 815978792 ops/sec (±0.11%) 816046567 ops/sec (±0.07%) 1.00
Plus number#napi-rs 27031004 ops/sec (±0.28%) 26828980 ops/sec (±1.14%) 0.99
Plus number#JavaScript 814173932 ops/sec (±0.11%) 814530306 ops/sec (±0.24%) 1.00
Create buffer#napi-rs 651902 ops/sec (±12.81%) 651378 ops/sec (±12.67%) 1.00
Create buffer#JavaScript 3320953 ops/sec (±2.52%) 3734358 ops/sec (±2.72%) 1.12
createArray#createArrayJson 52957 ops/sec (±0.36%) 54366 ops/sec (±0.49%) 1.03
createArray#create array for loop 9159 ops/sec (±0.12%) 9295 ops/sec (±0.59%) 1.01
createArray#create array with serde trait 9393 ops/sec (±0.39%) 9377 ops/sec (±0.22%) 1.00
getArrayFromJs#get array from json string 23640 ops/sec (±0.56%) 23178 ops/sec (±0.67%) 0.98
getArrayFromJs#get array from serde 12518 ops/sec (±0.49%) 13418 ops/sec (±0.12%) 1.07
getArrayFromJs#get array with for loop 16041 ops/sec (±0.42%) 16176 ops/sec (±0.32%) 1.01
Get Set property#Get Set from native#u32 574207 ops/sec (±12.73%) 563322 ops/sec (±13.13%) 0.98
Get Set property#Get Set from JavaScript#u32 529032 ops/sec (±11.71%) 545876 ops/sec (±2.53%) 1.03
Get Set property#Get Set from native#string 598680 ops/sec (±2.01%) 572935 ops/sec (±11.95%) 0.96
Get Set property#Get Set from JavaScript#string 531575 ops/sec (±2.45%) 516450 ops/sec (±2.23%) 0.97
Async task#spawn task 26254 ops/sec (±0.83%) 26029 ops/sec (±0.34%) 0.99
Async task#ThreadSafeFunction 9176 ops/sec (±0.74%) 9227 ops/sec (±1.24%) 1.01
Async task#Tokio future to Promise 32190 ops/sec (±1.16%) 31225 ops/sec (±0.96%) 0.97
Query#query * 100 3613 ops/sec (±0.52%) 3630 ops/sec (±0.43%) 1.00
Query#query * 1 27665 ops/sec (±0.91%) 27017 ops/sec (±0.92%) 0.98

This comment was automatically generated by workflow using github-action-benchmark.

@Brooooooklyn Brooooooklyn force-pushed the 03-09-feat_napi_tokio_multi-thread_mode_on_wasi branch 2 times, most recently from 10b8cef to 5d425bd Compare March 13, 2025 14:38
@Brooooooklyn Brooooooklyn force-pushed the 03-09-feat_napi_tokio_multi-thread_mode_on_wasi branch from 5d425bd to 6184e1e Compare March 13, 2025 14:39
@Brooooooklyn Brooooooklyn marked this pull request as ready for review March 13, 2025 15:53
@Brooooooklyn Brooooooklyn merged commit 1fe6ad0 into main Mar 13, 2025
@Brooooooklyn Brooooooklyn deleted the 03-09-feat_napi_tokio_multi-thread_mode_on_wasi branch March 13, 2025 15:53
richerfu added a commit to ohos-rs/ohos-rs that referenced this pull request Apr 25, 2025
* chore(napi): SharedReference can be sync (napi-rs#2503)

* fix(napi): reference cannot impl send (napi-rs#2499)

* chore(napi): upgrade wasm tools

* chore(release): publish

 - @napi-rs/cli@3.0.0-alpha.74
 - @napi-rs/triples@2.0.0-alpha.36

* chore(deps): bump @babel/runtime from 7.26.9 to 7.26.10 (napi-rs#2508)

Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.26.9 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump axios from 1.8.1 to 1.8.3 (napi-rs#2507)

Bumps [axios](https://github.com/axios/axios) from 1.8.1 to 1.8.3.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.8.1...v1.8.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(napi): tokio multi-thread mode on wasi (napi-rs#2501)

* feat(napi): tokio multi-thread mode on wasi

* tokio_unstable flag

* snapshot

* ensure runtime

* oncelock combine lazylock

* noop feature

* fix(cli): CXX path for s390x (napi-rs#2509)

* chore(release): publish

 - @napi-rs/cli@3.0.0-alpha.75
 - @napi-rs/triples@2.0.0-alpha.37

* chore(deps): update dependency oxlint to ^0.16.0 (napi-rs#2512)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(napi): js callback in threadsafefunction should not be Send (napi-rs#2510)

* chore(deps): update dependency @oxc-node/core to ^0.0.21 (napi-rs#2515)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: upgrade npm dependencies (napi-rs#2516)

* Release independent packages

- napi@3.0.0-alpha.32
- napi-derive@3.0.0-alpha.29

* chore(deps): update dependency shx to ^0.4.0 (napi-rs#2518)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(napi): re-create async runtime (napi-rs#2519)

* Release independent packages

- napi@3.0.0-alpha.33

* feat(cli): add `wasm.browser.asyncInit` for large wasm file (napi-rs#2514)

* perf(build): remove --export-dynamic flag in wasi compilation (napi-rs#2523)

* chore(release): publish

 - @napi-rs/cli@3.0.0-alpha.76
 - @napi-rs/triples@2.0.0-alpha.38

* Release independent packages

- napi-build@2.1.6

* chore(deps): update dependency vite to v6.2.3 [security] (napi-rs#2528)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency sinon to v20 (napi-rs#2526)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update yarn to v4.8.0 (napi-rs#2530)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(cli): excludeNetwork on getting report (napi-rs#2531)

* chore(cli): excludeNetwork on getting report

* Update cli/src/api/templates/js-binding.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* format

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(deps): update yarn to v4.8.1 (napi-rs#2536)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency vite to v6.2.4 [security] (napi-rs#2538)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(cli): trim is not a function (napi-rs#2541)

* chore(cli): update deps (napi-rs#2542)

* chore(release): publish

 - @napi-rs/cli@3.0.0-alpha.77
 - @napi-rs/triples@2.0.0-alpha.39
 - @napi-rs/wasm-runtime@0.2.8

* chore(deps): update dependency @oxc-node/core to ^0.0.22 (napi-rs#2543)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: clippy fix (napi-rs#2545)

* chore(deps): update dependency vite to v6.2.5 [security] (napi-rs#2549)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update yarn to v4.9.0 (napi-rs#2551)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @oxc-node/core to ^0.0.23 (napi-rs#2552)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(napi): serde value ref to napi_value (napi-rs#2550)

* perf: convert serde value ref to napi_value

* chore: add test case

* fix: snapshot

* chore(deps): update dependency vite to v6.2.6 [security] (napi-rs#2554)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(wasm-runtime): remove `_isBuffer` patch (napi-rs#2560)

closes napi-rs#2559

* chore(deps): update yarn to v4.9.1 (napi-rs#2562)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(wasm-runtime): wasm fs proxy serialization (napi-rs#2564)

* fix: wasm fs proxy serialization

* type

* test(wasm-runtime): testing fs proxy on CI (napi-rs#2565)

* fix(cli): replace .wasm extension of wasm artifact (napi-rs#2556)

Co-authored-by: LongYinan <lynweklm@gmail.com>

* chore(release): publish

 - @napi-rs/cli@3.0.0-alpha.78
 - @napi-rs/triples@2.0.0-alpha.40
 - @napi-rs/wasm-runtime@0.2.9

* ci: test Windows on ARM (napi-rs#2566)

* fix(wasm-runtime): upgrade emnapi (napi-rs#2568)

* fix: fix window warning

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Cong-Cong Pan <dacongsama@live.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com>
Co-authored-by: CPunisher <1343316114@qq.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kevin Deng 三咲智子 <sxzz@sxzz.moe>
Co-authored-by: Toyo Li <lifenglin314@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant