Janrupf
ac3626a023
fix(napi): Fix buffer corruption and soundness issues ( #1923 )
...
* fix(napi): Fix buffer corruption and soundness issues
* test: fix tests to conform to buffer API
2024-01-29 18:32:28 +08:00
LongYinan
b9ba7c9d68
fix(napi): memory issue while creating external buffer on electron
2024-01-26 14:32:24 +08:00
LongYinan
aff95d0271
chore(napi): remove napi_val on Ref because it is unused
2024-01-26 03:29:52 +00:00
LongYinan
12503a8061
chore(napi): delete unwrap_from_ref API because it was never work
2024-01-26 02:58:53 +00:00
LongYinan
134707ef1d
fix(napi): callback in execute_tokio_future does not need to be Send ( #1917 )
...
The resolver does not need to be `Send` or `Sync`, because it's assumed to be called from the same thread that the JavaScript thread is running on.
2024-01-26 10:27:17 +08:00
LongYinan
43a080d52b
fix(napi): apply clippy suggestions ( #1878 )
2023-12-29 23:08:56 +08:00
LongYinan
8a9c42a985
fix(napi): compile error for wasm32-unknown-unknown target
...
- Close https://github.com/napi-rs/napi-rs/issues/1816
2023-11-20 17:10:58 +08:00
LongYinan
65f57918fb
style(napi): as ptr => ptr::cast ( #1786 )
2023-11-06 11:22:30 +08:00
LongYinan
feabcd7f16
test(napi): add tests for napi9 features ( #1784 )
2023-11-06 11:03:44 +08:00
LongYinan
4e4d891ad8
feat: add experimental Env::get_module_file_name
method ( #1783 )
2023-11-06 11:01:27 +08:00
LongYinan
2b0ddf4a21
feat(napi,sys): sync to napi9 ( #1781 )
...
- Close https://github.com/napi-rs/napi-rs/issues/1600
2023-11-06 11:00:27 +08:00
LongYinan
546b108a5b
feat(napi): support async class factory ( #1779 )
...
- Close https://github.com/napi-rs/napi-rs/issues/1777
2023-11-06 10:58:23 +08:00
LongYinan
13d0ce075e
feat: integrate with emnapi ( #1669 )
...
* Integrate with emnapi
* resolve conflict
* ignore wasm
* generate wasi file
* Add wasi test to workflow
* Fix wasi template
* emnapi new initialize api
* Finish test
* Purne tsconfig
* Generate wasi worker
* Fix electron test
* Finalize check
* Noop adjust_external_memory
* Apply cr suggestions
2023-11-02 12:57:11 +08:00
Tom Sherman
3418fd3e8f
feat(napi,sys): implement Symbol.for ( #1721 )
...
Co-authored-by: LongYinan <lynweklm@gmail.com>
2023-09-13 15:45:14 -07:00
LongYinan
05b4be4d80
style: clippy fix ( #1711 )
2023-08-30 16:41:13 +08:00
LongYinan
a7eeb0c31c
fix(napi): promise resolve error ( #1664 )
2023-07-24 00:36:24 +08:00
Markus
71e44be73d
fix(napi): access violation in property getter/setter closure ( #1552 )
...
Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
2023-04-03 11:12:07 +08:00
Victor Teo
aee742f185
feat(napi): property getter and setter with closure ( #1526 )
...
* getter with closure with segment fault
* fix getter closure pointer
* add setter
* Cleanup API
* Add test for `create_function_from_closure`
* Fix compile error
* Fix flaky test title
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
2023-03-21 11:22:07 +08:00
LongYinan
550ef7c3cc
feat: export registers in wasm32 target ( #1529 )
2023-03-20 18:42:27 +08:00
LongYinan
8e3eb6204b
fix(napi): support custom status in Error ( #1486 )
2023-02-09 23:18:57 +08:00
LongYinan
3bd2bf40b1
fix(napi): run_script return type ( #1467 )
2023-01-31 20:36:59 +08:00
LongYinan
e9de5681be
fix(napi): also apply electron external data fallback to lowlevel APIs ( #1458 )
...
* fix(napi): also apply electron external data fallback to lowlevel APIs
* chore: allow uninlined_format_args in tests
2023-01-28 21:31:57 +08:00
LongYinan
dc3a4c9f25
feat(napi): refactor ThreadsafeFunction to allow get return value of it ( #1427 )
2023-01-11 18:54:45 +08:00
LongYinan
328b84eb8f
style: run format
2022-12-17 00:14:05 +08:00
LongYinan
f8d1dcee5b
Merge pull request #1395 from napi-rs/tweaks-code
...
chore(napi): reduce Mutex usage while loading addon
2022-12-16 23:13:36 +08:00
LongYinan
6e4b16fe5d
style: clippy fix
2022-12-16 20:19:39 +08:00
F001
d2531352aa
feat(napi): add "run_script" for "Env" ( #1393 )
...
* add "run_script" for "Env"
* Apply suggestions from code review
use `AsRef<str>` instead of `&str`
Co-authored-by: LongYinan <lynweklm@gmail.com>
* use `AsRef<str>` instead of `&str`
Co-authored-by: LongYinan <lynweklm@gmail.com>
2022-12-16 15:56:36 +08:00
Devon Govett
5541d650a9
feat(napi): add threadsafe deferred values ( #1306 )
2022-10-03 13:00:48 +08:00
Devon Govett
5ba70b0e1a
fix(napi): improve error propagation ( #1303 )
2022-09-14 17:03:11 +08:00
LongYinan
b7a3103f0c
feat(napi-derive): catch_unwind attribute ( #1280 )
2022-08-19 23:36:36 +08:00
LongYinan
4412c28c6d
chore(napi): enhance error message when unwrap failed from JsObject ( #1259 )
2022-08-07 23:05:49 +08:00
LongYinan
5aa61c2142
fix(napi): use create_buffer/arrary_buffer if provided data is empty
2022-04-26 16:53:13 +08:00
Niklas Mischkulnig
39e55a39c9
fix(napi): use null pointer for empty buffers
2022-04-23 12:27:44 +02:00
Chanakya
09d7fd671a
fix cannot find trait ToNapiValue
error
2022-04-15 21:02:40 +08:00
LongYinan
c553dcd4e0
feat(napi): relax the value type on ThreadSafeFunction
2022-04-14 14:24:47 +08:00
Walt Seymour
73882337cc
unrwap -> unwrap
2022-04-14 14:24:32 +08:00
Stéphan Kochen
50f62f40d7
fix(napi): double allocation in create_buffer
2022-04-01 14:31:29 +08:00
LongYinan
dfd213a1ee
feat(napi): with_value
method on Property
2022-02-06 16:26:00 +08:00
messense
43fb8edecd
chore: forbid unsafe_op_in_unsafe_fn
2022-01-13 11:26:28 +08:00
LongYinan
e452c00fb4
feat: edition 2021
2021-12-08 13:18:47 +08:00
LongYinan
77dab3e9f7
docs(napi): prettier
2021-12-03 16:49:26 +08:00
Idan Attias
a5ba40ceda
feat(napi): enable node_api syntax error experimental functions
2021-12-02 13:59:27 +08:00
LongYinan
fa23769e9d
feat(napi): allow create reference with refcount
2021-11-30 17:14:01 +08:00
LongYinan
bdfb1506a2
feat(napi): implement external value
2021-11-21 16:24:58 +08:00
LongYinan
3386bb9867
feat(napi): support JsGlobal in Env
2021-11-15 22:41:01 +08:00
LongYinan
25231b6ae1
fix(napi): correct the CString usage
2021-11-15 16:55:13 +08:00
LongYinan
eaa96f7eb2
feat(napi): await Promise<T> in async fn
2021-11-15 16:54:55 +08:00
LongYinan
30031f09ed
feat(napi): create ThreadsafeFunction from JsFunction
2021-11-12 17:22:57 +08:00
LongYinan
0424a08c06
feat(napi): BigInt codegen support
2021-11-11 16:18:25 +08:00
LongYinan
e0671fe071
feat(napi): implement Env::throw to throw any JsValue
2021-11-06 23:33:58 +08:00