619 Commits

Author SHA1 Message Date
Cong-Cong Pan
a2ade0dfe5
perf(napi): use Vec with_capacity in FromNapiValue (#2793) 2025-07-22 17:40:15 +08:00
github-actions[bot]
63d536be4f
chore(napi): release v3.1.1 (#2792)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-21 20:47:24 +08:00
LongYinan
b6f883a053
Revert "fix(napi): callback should be Fn rather than FnOnce" (#2791)
This reverts commit 7449e5f5cc24e3b92e83aeba68991da7cf8a5b2c.
2025-07-21 20:45:17 +08:00
github-actions[bot]
03805d1d3a
chore: release (#2788)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-21 16:12:40 +08:00
LongYinan
16dbf68dca
chore(napi): add UnwindSafe and RefUnwindSafe back to AbortSignal and AsyncWorkPromise (#2789) 2025-07-21 16:03:24 +08:00
LongYinan
1ca2bad43f
feat(napi): provide ScopedTask to resolve JsValue with lifetime (#2786) 2025-07-21 13:55:44 +08:00
LongYinan
c657665a01
ci: pin release-plz action 2025-07-21 10:39:48 +08:00
LongYinan
a9dc138aa0
Release independent packages
- napi@3.0.0
- napi-derive@3.0.0
- napi-sys@3.0.0
2025-07-17 17:40:38 +08:00
LongYinan
a30d42c624
style: rust warning (#2776) 2025-07-12 23:38:42 +08:00
LongYinan
b5fa1ff688
Release independent packages
- napi@3.0.0-beta.12
- napi-derive@3.0.0-beta.12
2025-07-04 22:50:28 +08:00
LongYinan
0119f09237
feat(napi): support untyped TypedArray slice (#2762) 2025-07-03 16:50:35 +08:00
Brooooooklyn
2fed7f85e0
fix(napi): spawn_future_with_callback lifetime (#2760) 2025-07-03 07:09:22 +00:00
LongYinan
5add173ca2
feat(napi): support c string for object apis (#2759) 2025-07-03 14:08:05 +08:00
LongYinan
7e34e30b66
feat!(napi): create function from #[napi] fn (#2757) 2025-07-02 16:54:31 +08:00
Cong-Cong Pan
6222b39f5a
perf(napi): use Cell<bool> to replace AtomicBool (#2506)
* perf: use Cell<bool> to replace AtomicBool

* cargo fmt

---------

Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-07-02 09:29:07 +08:00
LongYinan
a64df02e84
perf(napi): sender in Promise does not need to be Arc (#2756) 2025-07-01 08:40:24 -07:00
LongYinan
718b7d1ee0
fix(napi): drop SymbolRef and ObjectRef properly (#2755) 2025-07-01 08:28:42 -07:00
LongYinan
99f4c089d4
feat(napi): add napi_ref impl for Object Symbol and External (#2754) 2025-07-01 00:45:32 -07:00
LongYinan
caf0400090
Release independent packages
- napi@3.0.0-beta.11
- napi-derive@3.0.0-beta.11
2025-06-30 17:12:39 +08:00
LongYinan
b5e9c41d14
fix(napi): remove DerefMut impl for all TypedArray types (#2750) 2025-06-29 08:49:29 -07:00
LongYinan
56998d5f12
fix(napi): callback should be Fn rather than FnOnce (#2749)
In ThreadsafeFunction::call_with_return_value
2025-06-28 21:57:54 +08:00
LongYinan
3898211b3a
Release independent packages
- napi@3.0.0-beta.10
- napi-derive@3.0.0-beta.10
2025-06-25 16:06:28 +08:00
LongYinan
8c3db48686
style: run clippy on nightly Rust (#2744) 2025-06-25 13:55:11 +08:00
LongYinan
3e2fe8a2a3
fix(napi): create external TypedArray in Electron env (#2740) 2025-06-24 22:48:00 +08:00
LongYinan
b40aaa8d71
Release independent packages
- napi@3.0.0-beta.9
- napi-derive@3.0.0-beta.9
2025-06-24 16:33:32 +08:00
LongYinan
a773f8d438
fix(napi): prevent panic in ThreadsafeFunctionHandle::drop if ThreadsafeFunction::create fail (#2731) 2025-06-24 15:01:08 +08:00
LongYinan
8df3f942e6
fix(napi): wrong drop impl for TypedArray::with_external_data (#2724) 2025-06-23 17:48:21 +08:00
LongYinan
1a90e82bb1
perf(napi): remove unnecessary wrap in Task (#2714) 2025-06-13 00:02:14 -07:00
LongYinan
2b443401ac
fix(napi): set AbortError name (#2713) 2025-06-11 14:05:40 -07:00
LongYinan
fcfac5083a
fix(napi): avoid allocate empty Box if closures is empty (#2712)
Ref: https://github.com/napi-rs/napi-rs/pull/2711
2025-06-11 13:19:38 -07:00
LongYinan
97ed022e46
fix(napi): avoid add finalizer if properties is empty (#2711) 2025-06-11 12:47:49 -07:00
LongYinan
668b53e849
Release independent packages
- napi@3.0.0-beta.8
- napi-derive@3.0.0-beta.8
2025-06-08 21:44:17 +08:00
LongYinan
3f4338a907
fix(napi): memory leak in Object Property (#2699) 2025-06-07 22:24:05 +08:00
Hana
e31b898a35
feat(napi): support setting error_status of ThreadsafeFunctionBuilder (#2695) 2025-06-06 16:27:52 +08:00
Hana
0a90c8a8f2
feat(napi): support build_threadsafe_function variant with error status (#2694) 2025-06-05 21:35:18 +08:00
LongYinan
19146503ff
Release independent packages
- napi@3.0.0-beta.7
- napi-build@2.2.1
2025-06-04 20:25:05 +08:00
LongYinan
8256b9515e
Release independent packages
- napi@3.0.0-beta.6
- napi-derive@3.0.0-beta.6
- napi-build@3.0.0-beta.0
2025-06-04 18:24:11 +08:00
LongYinan
a8d39e98df
Release independent packages
- napi@3.0.0-beta.5
- napi-derive@3.0.0-beta.5
2025-06-04 17:07:12 +08:00
Cong-Cong Pan
a6f133cf7f
perf(napi): PersistedPerInstanceHashMap can be thread local (#2681)
* perf: PersistedPerInstanceHashMap can be thread local

* fix

* fix

* fix cargo clippy
2025-06-04 11:46:36 +08:00
LongYinan
2f64f200da
Release independent packages
- napi@3.0.0-beta.4
- napi-derive@3.0.0-beta.4
2025-06-03 19:25:47 +08:00
Hana
f4731bb566
feat!(napi): support custom tsfn result error code (#2672) 2025-06-02 22:47:50 +08:00
LongYinan
b93bdfd3eb
test: stress test on aarch64 linux gnu platform (#2662)
* test: stress test on aarch64 linux gnu platform

* remove configs in yarnrc

* clippy
2025-06-02 22:45:01 +08:00
Cong-Cong Pan
6bbf25a3f3
perf(napi): hash map (#2671) 2025-05-30 23:38:17 +08:00
Cong-Cong Pan
9173e8eb28
feat!(napi): define propertes support symbol as name (#2673)
* feat: define properties support symbol as name

* fix

* fix
2025-05-30 23:37:19 +08:00
LongYinan
6fd2f0d962
Release independent packages
- napi@3.0.0-beta.3
- napi-sys@3.0.0-alpha.2
- napi-derive@3.0.0-beta.3
2025-05-29 23:14:41 +08:00
LongYinan
a4cc0f58b4
feat(napi): add into_unknown on ToNapiValue (#2669) 2025-05-29 19:35:04 +08:00
LongYinan
29ae3ab604
fix(napi): use Arc in Reference because it is Send (#2668) 2025-05-29 09:12:02 +08:00
LongYinan
3a720f09cf
feat(sys): sync Node-API version changes (#2661)
* feat(sys): sync Node-API version changes

* upgrade electron

* move node_api_create_buffer_from_arraybuffer to experimental
2025-05-25 00:48:56 +08:00
LongYinan
9cccc46790
docs: update example in README (#2660) 2025-05-24 23:29:24 +08:00
LongYinan
f8fab45de7
feat(napi): serialize BigInt to serde::Value (#2659) 2025-05-24 23:18:40 +08:00