forehalo
2467b7139b
Introduce #[napi]
procedural macro to automation development boilerplate ( #696 )
...
* napi procedural macro for basic rust/JavaScript types
* introduce the `compat-mode` for `napi` and `napi-derive` crates for backward compatible
* remove #[inline] and let compiler to decide the inline behavior
* cli now can produce the `.d.ts` file for native binding
* many tests and example for the new procedural macro
Co-authored-by: LongYinan <lynweklm@gmail.com>
2021-09-23 01:29:09 +08:00
LongYinan
bb9a819188
feat(napi): impl more types AsRef and AsMut for TypedArray
2021-05-25 00:07:16 +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
911a0c139d
feat(napi): Env::create_arraybuffer_with_borrowed_data
2021-01-05 23:27:01 +08:00
LongYinan
501313789d
feat(napi): AsMut and DerefMut for JsBuffer
2020-12-25 00:21:37 +08:00
LongYinan
ba9744e89c
refactor(napi): reduce useless type cast
2020-12-02 18:39:20 +08:00
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
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
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
adumbidiot
d9214e7805
Convert bindgen rustified_enum
to newtype_enum
2020-11-02 19:23:41 -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
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
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
c0277542a2
refactor(napi): from_raw_unchecked and this_unchecked
2020-09-26 17:49:30 +08:00
LongYinan
df5b082141
perf(napi): remove typecheck in CallContext for better performance
2020-09-07 17:26:28 +08:00
LongYinan
1c3d9b4e9a
test(napi): add more object functions tests
2020-09-03 15:34:27 +08:00
LongYinan
ea3fff25ae
feat(napi): serde-json feature
2020-09-01 23:48:02 +08:00
LongYinan
64df7205e9
refactor(napi): change data to &'static [u8] in JsBuffer
2020-08-10 13:52:05 +08:00
LongYinan
3508956d16
feat(napi): implement either type
2020-07-18 02:11:49 +08:00
LongYinan
0216c55e54
refactor(napi): redesign the JavaScript values API
2020-06-28 23:29:04 +08:00