LongYinan
00aa4ad632
napi@1.5.0
2021-04-14 14:58:13 +08:00
LongYinan
d1bceccbe6
feat(napi): expose create_string_from_c_char for C ffi scenario
2021-04-14 14:05:07 +08:00
LongYinan
5a21bbeb8e
fix(napi): memory ordering issues in tsfn
2021-04-12 18:04:02 +08:00
LongYinan
0b96ac24de
napi@1.4.0
2021-04-01 21:08:12 +08:00
LongYinan
d4331e05df
refactor(napi): split NapiRaw trait from NapiValue
2021-04-01 18:57:49 +08:00
LongYinan
ba1d16759f
chore: wrong keyword
2021-03-31 21:51:12 +08:00
LongYinan
9351c65161
napi@1.3.4
2021-03-31 21:49:50 +08:00
LongYinan
f0b8c5da07
fix(napi): do not call release tsfn in Drop when ref count is 0
2021-03-31 21:31:37 +08:00
LongYinan
925786c955
style: fix clippy error
2021-03-31 11:53:51 +08:00
LongYinan
4ca12ec7db
napi@1.3.3
2021-03-22 11:50:04 +08:00
LongYinan
f45f1aeb53
fix(napi): finalizer maybe_ref pointer value
2021-03-19 13:53:28 +08:00
Daniel Henry-Mantilla
4aba159958
Add a way to convert _stateful_ (Rust) closures into JsFunction
s.
2021-03-18 21:09:55 +01:00
LongYinan
7c6bfb4087
napi@1.3.2
2021-03-12 16:26:19 +08:00
LongYinan
1e3290cd01
fix(napi): napi_adjust_external_memory issue on wini686
2021-03-12 16:09:57 +08:00
LongYinan
0f300da917
napi@1.3.1
2021-03-11 19:03:17 +08:00
LongYinan
50f207f744
fix(napi): InvalidArg error when create_external with size hint
2021-03-11 19:02:42 +08:00
LongYinan
66663d129d
napi@1.3.0
2021-03-11 14:06:51 +08:00
Daniel Henry-Mantilla
0204ef9342
Added a way to opt out of error handling for ThreadsafeFunction
s.
...
This is to allow having the `ThreadSafeFunction` expect the same calling API
as an unwrapped `JsFunction` would have: in some contexts this consistency is
more desireable than giving the option to the caller to handle a native-to-js
conversion failure (or somebody having directly fed a `Result<T>`; although
that use case seems oddly niche to me: it can already be covered when
`type T = Result<U>;` and propagated/flattened inside the `R` closure with a
simple `?`), since such failure can already be quite fatal / unexpected in
some cases.
In order to keep the code backwards-compatible, this PR uses an added
**optional** generic (type) parameter. Since this parameter, semantically,
represents an `enum`, and since we don't have yet `const_generic` `enum`s, we
circumvent this limitation by using the type-level enum pattern, which is
abtracted away with a helper macro that incidentally yields some handy docs
(I can attach a rendered version of the docs hosted on netlify if the reviewer
so wishes).
2021-03-09 23:51:12 +01:00
LongYinan
49eaaf30e9
napi@1.2.0
2021-02-26 18:52:31 +08:00
LongYinan
071dcff9eb
feat(napi): add back clone trait to ThreadsafeFunction
2021-02-26 18:38:48 +08:00
LongYinan
e622d9693a
feat(napi): unwrap &'static value from Ref object
2021-02-25 22:17:21 +08:00
LongYinan
c39b364319
chore(napi): upgrade tokio
2021-02-07 00:08:38 +08:00
LongYinan
237fda55aa
napi@1.1.3
2021-02-01 18:10:51 +08:00
LongYinan
2775b47e33
chore(napi): upgrade tokio to 1.1
2021-02-01 18:10:05 +08:00
LongYinan
39595ddfca
napi@1.1.2
2021-01-25 14:13:55 +08:00
LongYinan
f46aa1f67a
fix(napi): throw JavaScript error in tsfn rather than rust thread panic
2021-01-25 12:11:12 +08:00
LongYinan
0c041ee629
napi@1.1.1
2021-01-07 22:56:15 +08:00
LongYinan
c1215379f2
feat(napi): impl Clone + Copy for Primitive types
2021-01-07 11:34:49 +08:00
LongYinan
e24738a4d8
fix(napi): remove into_*_ref from JsString
...
Close https://github.com/napi-rs/napi-rs/issues/411
2021-01-07 11:14:01 +08:00
LongYinan
30ef04cbfa
napi@1.1.0
2021-01-05 23:42:54 +08:00
LongYinan
911a0c139d
feat(napi): Env::create_arraybuffer_with_borrowed_data
2021-01-05 23:27:01 +08:00
LongYinan
4d0b79aa02
napi@1.0.1
2021-01-04 15:16:52 +08:00
LongYinan
0c9981beb7
fix(napi): enable napi4 when tokio_rt enabled
2021-01-04 14:57:45 +08:00
LongYinan
c28f035f5c
fix(napi): remove unexpected napi_acquire_threadsafe_function
2021-01-04 14:56:32 +08:00
LongYinan
294563d8dc
chore(build): upgrade ureq to 2.0
2021-01-04 13:55:26 +08:00
LongYinan
e02bda46c1
1.0.0
2020-12-30 00:56:08 +08:00
LongYinan
f2e046958f
napi@1.0.0-alpha.11
2020-12-29 16:39:30 +08:00
LongYinan
50ce9c6569
feat(napi): implement value getter for JsNumber
2020-12-29 16:36:38 +08:00
LongYinan
cbd4e4d1fc
chore(napi): remove TryFrom<JsNumber> for usize
2020-12-28 21:40:06 +08:00
LongYinan
96b1abc00f
napi@1.0.0-alpha.10
2020-12-28 14:02:59 +08:00
LongYinan
ad2a84984f
feat(napi): uncheck version of Object methods
2020-12-27 23:46:07 +08:00
LongYinan
9fb5a61a0b
napi@1.0.0-alpha.9
2020-12-25 12:02:39 +08:00
LongYinan
b1c8192d2a
refactor(napi): JsUnknow::cast now will not move ownership
2020-12-25 12:02:24 +08:00
LongYinan
a3d8623198
napi@1.0.0-alpha.8
2020-12-25 00:36:22 +08:00
LongYinan
501313789d
feat(napi): AsMut and DerefMut for JsBuffer
2020-12-25 00:21:37 +08:00
LongYinan
ff66f102de
napi@1.0.0-alpha.7
2020-12-24 15:46:20 +08:00
LongYinan
2a6c452ce7
refactor(napi): create_buffer_with_borrowed_data now accept not-null finalize_callback
2020-12-24 15:45:59 +08:00
LongYinan
ac2f3bd00e
napi@1.0.0-alpha.6
2020-12-24 13:55:45 +08:00
LongYinan
f59d3ee5fc
feat(napi): tokio 1.0
2020-12-24 13:55:21 +08:00
LongYinan
26a2c01cd6
feat(napi): From Serde JSON Error for Error
2020-12-24 12:20:23 +08:00