LongYinan
1a3621b727
feat(napi): major upgrades for napi@1
...
1. inline everything
2. change `check_status` and `type_of` to macro
3. provide #[module_exports] macro
4. remove debug and repr[transparent] for ffi struct
2020-11-26 11:31:49 +08:00
LongYinan
c370b8374b
fix(napi): CString memory leak
2020-11-20 10:53:33 +08:00
LongYinan
e337a58714
chore(napi): remove unsafe from CallContext::this_unchecked
2020-11-20 09:09:57 +08:00
LongYinan
781ff8dc14
refactor(napi): make NapiTrait to be unsafe
...
close https://github.com/napi-rs/napi-rs/issues/299
2020-11-20 00:07:20 +08:00
LongYinan
2d47969d08
fix(napi): CString issues
2020-11-19 23:41:29 +08:00
LongYinan
e4f005c735
fix(napi): memory leak with CString
2020-11-15 23:22:29 +08:00
LongYinan
68017ce246
fix(napi): memory leak in create_named_property
2020-11-14 11:45:10 +08:00
LongYinan
1669b3a8f1
fix(napi): windows-i686 release build problem
2020-11-14 00:22:10 +08:00
LongYinan
add6e2b9dc
fix(napi): import name conflict
2020-11-12 11:41:41 +08:00
LongYinan
e9fd5d3d40
feat(napi): add abort guard in tsfn methods
2020-11-12 10:47:33 +08:00
LongYinan
eb5f4931bd
feat(napi): impl Clone and Drop for ThreadSafeFunction, return Status from ThreadSafeFunction::call
2020-11-11 16:51:11 +08:00
LongYinan
f3bb57abfb
fix(napi): hanlde unknown enum values from FFI
2020-11-11 14:34:30 +08:00
LongYinan
fc0ec0b378
refactor(napi-sys): remove bindgen
2020-11-10 17:52:59 +08:00
LongYinan
47f5011a8f
feat(napi): support build on i686-pc-windows-msvc
2020-11-04 23:08:54 +08:00
LongYinan
f9ec712d57
Merge pull request #283 from napi-rs/simplify-module-register
...
chore(napi): simplify module register, support node@10+
2020-11-04 17:41:19 +08:00
LongYinan
7c996ebaa0
chore(napi): remove useless From trait
2020-11-04 16:36:01 +08:00
LongYinan
078d1ed2d0
chore(napi): simplify module register, support node@10+
2020-11-04 15:54:57 +08:00
adumbidiot
d9214e7805
Convert bindgen rustified_enum
to newtype_enum
2020-11-02 19:23:41 -08:00
LongYinan
2993287010
feat(napi): expose length property in CallContext
2020-10-31 22:51:40 +08:00
LongYinan
8c9295f6f0
fix(napi): return self in Property#with_property_attributes
2020-10-31 22:22:23 +08:00
LongYinan
f1f9402a44
feat(napi): export PropertyAttributes
2020-10-31 22:19:57 +08:00
adumbidiot
5364458366
Avoid running entire napi_build::setup twice
2020-10-30 18:29:08 -07:00
adumbidiot
e36e1e1fbb
Copy win_delay_load_hook from Neon
2020-10-30 18:24:19 -07:00
LongYinan
6ba674e4bc
feat(napi): new JsFunction instance
2020-10-27 14:19:40 +08:00
LongYinan
e559908b76
feat(napi): implement create_array
2020-10-21 15:17:06 +08:00
LongYinan
64d66a2261
chore: tokio@0.3
2020-10-16 20:58:56 +08:00
LongYinan
5a49efe25e
feat: support linux aarch64
2020-10-15 09:12:43 +08:00
LongYinan
826ebd9847
refactor(napi): module register logic
2020-10-14 11:30:41 +08:00
LongYinan
13216f523a
feat(napi): napi_get_all_property_names
2020-10-12 22:38:52 +08:00
LongYinan
1dc9974c19
feat(napi): implement detach arraybuffer
2020-10-11 22:26:09 +08:00
LongYinan
ae8de8a631
feat(napi): implement dataview related apis
2020-10-11 22:15:58 +08:00
LongYinan
809ecfec49
feat(napi): implement create_buffer_copy
2020-10-11 21:54:23 +08:00
LongYinan
276fc45603
style: format toml files
2020-10-11 21:36:14 +08:00
LongYinan
d151318131
fix(napi): TypedArray napi < 6 compatible issue
2020-10-10 19:00:21 +08:00
LongYinan
0deb9f7755
feat(napi): implement TypedArray related APIs
2020-10-10 18:54:05 +08:00
LongYinan
3da8daf192
feat(napi): implement napi_reference_ref
2020-10-10 18:21:11 +08:00
LongYinan
e0d75d1453
feat(napi): implement napi_is_promise
2020-10-10 18:17:32 +08:00
LongYinan
6c95d86d2f
feat(napi): implement date related API
2020-10-10 15:02:11 +08:00
LongYinan
c5f2b6699d
refactor(napi): thread safe function redesign
2020-10-04 17:16:35 +08:00
LongYinan
45411a59ea
feat(napi): implement env cleanup hook
2020-10-04 16:02:04 +08:00
LongYinan
43c01796eb
feat(napi): implement JsTimeout
2020-10-03 14:57:56 +08:00
LongYinan
a532451fc0
feat(napi): refactor Env::get_global
2020-10-03 14:57:31 +08:00
LongYinan
3eecf1fc5f
fix(napi): arraybuffer implement
...
close https://github.com/napi-rs/napi-rs/issues/68
2020-09-30 18:23:31 +08:00
LongYinan
9c921ffaa3
refactor(napi): scope and Ref
2020-09-30 15:54:54 +08:00
LongYinan
fb4d07edd4
feat: add benchmark crate and frameworks
2020-09-30 15:31:17 +08:00
LongYinan
aadca83d2e
refactor(napi): implement async task cancel
2020-09-26 18:12:52 +08:00
LongYinan
f1281af260
feat(napi): add lifetime span to JsBuffer
2020-09-26 17:59:58 +08:00
LongYinan
c0277542a2
refactor(napi): from_raw_unchecked and this_unchecked
2020-09-26 17:49:30 +08:00
LongYinan
d3fdfd48d0
refactor(napi): remove useless handle_scope operation in async_work
2020-09-26 17:14:44 +08:00
LongYinan
8440c6893a
chore(release): publish
2020-09-07 17:44:31 +08:00
LongYinan
df5b082141
perf(napi): remove typecheck in CallContext for better performance
2020-09-07 17:26:28 +08:00
LongYinan
1219f3b172
chore(release): publish
...
- napi@0.5.0
- napi-derive@0.5.0
2020-09-03 20:39:29 +08:00
LongYinan
9aec0ec38e
docs: upgrade docs
2020-09-03 20:38:28 +08:00
LongYinan
371cc5eab0
feat(napi): string latin1 support
2020-09-03 19:11:30 +08:00
LongYinan
1c3d9b4e9a
test(napi): add more object functions tests
2020-09-03 15:34:27 +08:00
LongYinan
76d1258592
feat(napi): implement all object functions
2020-09-03 00:02:41 +08:00
LongYinan
a022fe01d9
chore(napi): cleanup codes
2020-09-02 10:59:11 +08:00
LongYinan
ea3fff25ae
feat(napi): serde-json feature
2020-09-01 23:48:02 +08:00
LongYinan
98ca6a3339
chore(release): publish
...
- napi@0.4.13
2020-08-24 20:10:32 +08:00
LongYinan
be8e0f09e6
build(napi): fix docsrs build
2020-08-24 20:10:11 +08:00
LongYinan
1a23ab4606
chore(release): publish
...
- napi@0.4.12
- napi-sys@0.4.7
2020-08-24 19:48:02 +08:00
LongYinan
e1476cb219
chore(release): publish
...
- napi@0.4.11
- napi-sys@0.4.6
2020-08-24 19:08:09 +08:00
LongYinan
98210cd771
feat(napi): implement more napi
2020-08-24 16:16:41 +08:00
Ouyang Yadong
00454eb577
refactor(napi): use get_uv_event_loop instead of uv_default_loop
...
Using the uv_loop_s from napi_env is safer as it's possible that
there are multiple Workers, and therefore multiple uv_loop_s.
2020-08-18 13:55:35 +08:00
LongYinan
b19bfcf651
chore(release): publish
...
- napi-sys@0.4.5
- napi@0.4.10
2020-08-16 17:41:44 +08:00
LongYinan
6e734030a8
chore(release): publish
...
- napi@0.4.9
- napi-sys@0.4.4
2020-08-16 16:21:13 +08:00
LongYinan
9b56f7a04a
build: try fix docs-rs build
2020-08-15 18:32:41 +08:00
LongYinan
f8711f33d9
chore(release): publish
...
- napi-sys@0.4.3
- napi@0.4.8
2020-08-14 00:21:48 +08:00
Ouyang Yadong
14dd8b83e6
feat(napi): add BigInt related apis
2020-08-12 22:40:52 +08:00
LongYinan
4babd2694a
chore(release): napi@0.4.7
2020-08-10 14:16:17 +08:00
LongYinan
64df7205e9
refactor(napi): change data to &'static [u8] in JsBuffer
2020-08-10 13:52:05 +08:00
LongYinan
5b10965f9c
chore(release): napi@0.4.6
2020-08-06 14:53:59 +08:00
LongYinan
e866278654
fix(napi): need Send with Task trait
2020-08-06 14:53:59 +08:00
LongYinan
2e9e86a841
build: fix features in docs.rs
2020-08-03 16:17:14 +08:00
LongYinan
712eb82c40
chore(release): napi@0.4.4
2020-08-03 14:35:22 +08:00
LongYinan
b69a183681
fix(napi): wrong string length
2020-08-03 14:34:58 +08:00
LongYinan
be51252e18
chore(release): napi@0.4.3, napi-sys@0.4.1
2020-08-03 13:56:52 +08:00
Michael Orenstein
6b8bd01bcc
Updated threadsafe documentation to mention the first argument error convention
2020-07-26 18:26:42 +09:30
Michael Orenstein
74cd9c49c2
Fixed documentation of threadsafe functions
2020-07-26 17:46:45 +09:30
messense
e7a8cbf26b
Rename napi_rs to napi
2020-07-19 17:29:47 +08:00
LongYinan
8497479c7a
chore(release): publish
...
- napi@0.4.2
- napi-derive@0.4.1
2020-07-18 11:05:20 +08:00
LongYinan
3508956d16
feat(napi): implement either type
2020-07-18 02:11:49 +08:00
LongYinan
5113637c15
fix(napi): bump napi-build version
2020-07-15 01:40:24 +08:00
LongYinan
f5d8d14089
chore: bump napi-build
2020-07-15 01:36:02 +08:00
LongYinan
6489c11185
doc: update git repo url
2020-07-15 01:23:23 +08:00
LongYinan
244db37c3b
refactor: decouple sys module of new napi-rs into a crate
2020-07-15 00:59:41 +08:00
LongYinan
cce5f1fe00
fix(napi): missing declaration in register_module macro
2020-07-14 23:53:00 +08:00
LongYinan
62482ab2e6
doc: add some documents
2020-07-14 23:05:08 +08:00
LongYinan
9118e9e62d
feat(napi): implment tokio_rt feature
2020-07-14 22:58:05 +08:00
LongYinan
04238c38ab
style(napi): typo adjust
2020-07-07 11:57:33 +08:00
LongYinan
f4a331cfe2
feat(napi): provide execute function to run Future on libuv
2020-07-07 11:57:32 +08:00
Ouyang Yadong
472d4f2ab5
chore: add into_unknown; refactor tsfn api; add tests for js function
2020-07-04 00:05:31 +08:00
LongYinan
0d5f03f845
feat: move napi version features setup to build package
2020-07-02 00:40:36 +08:00
LongYinan
0216c55e54
refactor(napi): redesign the JavaScript values API
2020-06-28 23:29:04 +08:00
Ouyang Yadong
f126a0581f
feat(napi): impl threadsafe function api
2020-06-28 22:47:08 +08:00
LongYinan
628452c70a
perf(napi-derive): remove useless alloc in function CallContext
2020-06-21 17:50:38 +08:00
LongYinan
17cb852a6e
refactor(napi): self in Task::compute could be mutable
2020-06-19 16:19:06 +08:00
LongYinan
79401d693e
feat(napi): implement create_external and get_value_external
2020-06-19 16:16:28 +08:00
LongYinan
422682c8b8
test: setup test framework in test_module project
2020-06-17 20:53:41 +08:00
Ouyang Yadong
9f49fd9b4e
refactor: remove sys:napi_async_init() in AsyncWork
2020-06-17 00:09:37 +08:00
Ouyang Yadong
4baff91a58
feat(napi): impl is_date
2020-06-15 21:15:59 +08:00
LongYinan
28257b45c1
feat(napi): support musl linux
...
drop future executor due to mutithreads bug.
2020-06-11 16:20:37 +08:00
dependabot-preview[bot]
50a032f139
build(deps): update semver requirement from 0.9 to 0.10
...
Updates the requirements on [semver](https://github.com/steveklabnik/semver ) to permit the latest version.
- [Release notes](https://github.com/steveklabnik/semver/releases )
- [Commits](https://github.com/steveklabnik/semver/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-25 07:20:20 +00:00
dependabot-preview[bot]
da4835a349
build(deps): update bindgen requirement from 0.53 to 0.54
...
Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen ) to permit the latest version.
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases )
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.53.0...v0.54.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-22 07:05:09 +00:00
LongYinan
d9f3a818aa
chore(release): napi@0.3.1
2020-05-15 14:29:06 +08:00
LongYinan
ec235d284d
refactor(spawn): napi_async_worker implementation
2020-05-15 14:03:02 +08:00
LongYinan
f7a0f70830
refactor(executor): cleanup uv_async_t alloc logic
2020-05-12 11:04:52 +08:00
LongYinan
c92b7760bf
chore: remove useless Box in Task
2020-05-11 18:20:52 +08:00
LongYinan
869ed76c0b
feat(napi): impl spawn for tasks need to be run in the other thread
2020-05-11 16:32:57 +08:00
LongYinan
37e64c4960
chore(release): napi-rs@0.3, napi-rs-derive@0.2
2020-05-09 15:34:55 +08:00
LongYinan
91cca630a9
perf: borrow Env in CallContext
2020-05-09 15:14:44 +08:00
LongYinan
1a280aa30f
refactor(napi): async and lifetime span
2020-05-09 14:13:25 +08:00
LongYinan
0a388056ad
chore(release): publish napi-rs 0.2.3
2020-05-01 23:53:32 +08:00
LongYinan
57b319273c
feat(napi): impl get_value for Boolean
2020-05-01 23:52:01 +08:00
LongYinan
c1da4f8d8e
chore(release): publish napi-rs 0.2.2
2020-05-01 12:48:19 +08:00
LongYinan
f74c383408
feat(napi): tweaks
...
env.throw_error
String => JsString
JsString.as_str
Status into napi_status
2020-05-01 01:27:01 +08:00
LongYinan
81adb5ceab
chore: version patch
2020-04-26 19:57:31 +08:00
LongYinan
4c0341961c
refactor(napi-rs): impl TryFrom instead of TryInto
2020-04-26 18:46:56 +08:00
LongYinan
0b2561225f
feat(derive): js_function derive
2020-04-26 16:36:44 +08:00
LongYinan
f29ddc3a19
feat(napi): impl create_uint32
2020-04-20 00:43:48 +08:00
LongYinan
fa8e1be7b9
refactor(napi-rs): make api calls more safety
2020-04-19 18:52:32 +08:00
LongYinan
de6863cd3a
feat: support basic arrayBuffer
2020-04-08 23:58:50 +08:00
LongYinan
5574930e18
feat(napi): implement serde feature
2020-04-03 00:09:44 +08:00
LongYinan
d0eadec77b
fix(executor): close_uv when future ready
2020-04-01 23:36:19 +08:00
LongYinan
f8dd29084b
v0.2.0
2020-03-16 14:35:11 +08:00
LongYinan
090e7d6fb3
chore: prepare for release
2020-03-16 14:30:54 +08:00
LongYinan
ef99000955
fix(executor): use Arc to ensure thread safe
2020-03-12 22:40:21 +08:00
LongYinan
1e4aa3a2a5
feat(buffer): implement from_value
2020-02-22 12:34:04 +08:00
LongYinan
0bfcdff29f
fix(buffer): create_buffer_with_data
2020-02-21 00:45:30 +08:00
LongYinan
48c9a8956c
build: enhance the build pipeline
2020-02-19 17:45:57 +08:00
LongYinan
e0e85502af
feat: upgrade to std-future
2020-02-18 21:09:17 +08:00