LongYinan
b7a3103f0c
feat(napi-derive): catch_unwind attribute ( #1280 )
2022-08-19 23:36:36 +08:00
LongYinan
14aab065e7
fix(cli): zig cross to *-apple-darwin target
2022-08-12 16:52:21 +08:00
Amr Bashir
9be7ae2bf9
feat(cli): use CARGO_TARGET_DIR
if set ( #1251 )
...
* feat: use `CARGO_TARGET_DIR` if set
* use `||` instead of `??`
* use `CARGO_BUILD_TARGET_DIR` also if set
* disable eslint prefer-nullish-coalescing
2022-07-31 22:41:32 +08:00
messense
beb75111fc
fix(cli): parse host target triple from rustc -vV
( #1191 )
2022-05-22 13:43:35 +08:00
messense
1399288df5
feat(cli): allow specifying an alternative cargo binary via CARGO
env var ( #1181 )
2022-05-14 15:03:31 +08:00
LongYinan
1bf072ad7d
refactor(napi): use libloading on Windows
2022-05-06 22:27:09 +08:00
LongYinan
c3a35a0704
fix(cli): generated type def on multi impl blocks
2022-04-26 18:04:37 +08:00
Gabriel Francisco
c39060984d
feat(cli): add build option to not include the header in dts file ( #1140 )
...
* Add build option to not include the header in dts file
* Fix lint
2022-04-22 16:52:43 +08:00
killa
6bef28a59b
fix: cargo metadata with large project ( #1117 )
...
Set `maxBuffer` to 10mb, cargo metadata may output
data more than 1mb(the nodejs default value).
Refs:
- https://github.com/napi-rs/napi-rs/issues/1116
2022-04-02 02:33:40 +08:00
LongYinan
8700da1776
fix(cli): should not throw if cargoName is provided but no package.name
2022-04-01 17:07:53 +08:00
messense
20b1edc53b
feat(cli): add support for building binaries
2022-04-01 14:00:42 +08:00
LongYinan
bd08787270
fix(cli): respect CARGO_BUILD_TARGET env variable
2022-04-01 13:30:16 +08:00
LongYinan
09ccfaad1d
fix(cli): use shell file path instead of commands for zig CC and CXX
2022-03-13 18:28:29 +08:00
Stéphan Kochen
e69f0230c2
fix(cli): temporary dts path may not be writable
2022-03-03 10:45:27 +01:00
LongYinan
f9c618e046
fix(cli): generate ExternalObject type on demand
2022-02-10 18:37:04 +08:00
LongYinan
63a16d0a27
fix(cli): missing shebang in zig-cross sh file
2022-01-18 13:41:59 +08:00
LongYinan
1799aa94e3
fix(cli): swap -lgcc_s with -lunwind
2022-01-17 14:05:52 +08:00
messense
d84cbe88bd
fix(cli): properly handle RUSTFLAGS env var
2022-01-13 21:36:59 +08:00
LongYinan
95d49f8cf4
fix(cli): zig abi should pass to linker
2022-01-13 18:21:20 +08:00
messense
887bdb9d29
feat(cli): add --strip
option for removing symbols
2022-01-13 17:00:04 +08:00
LongYinan
472ac10c67
fix(cli): missing zig-abi-suffix support
2022-01-13 14:26:29 +08:00
LongYinan
0db94ccd66
feat(cli): support macOS with --zig flag
2022-01-06 12:53:45 +08:00
messense
ca3790bdf1
Add support for cross compilation with Zig ( #983 )
...
feat(cli): add support for cross compilation with Zig
2021-12-31 11:20:55 +08:00
LongYinan
556ace8f33
fix(napi-derive,cli): export type alias for original name
2021-12-25 17:36:12 +08:00
LongYinan
db40b6a874
chore(cli): docs enhancement
2021-12-23 17:47:43 +08:00
Hana
894334e8f1
fix(cli): fix crate-type hint
2021-12-23 03:10:44 +08:00
LongYinan
046f75dc29
feat(cli): provide a way to override the native package name
2021-12-22 20:24:15 +08:00
h-a-n-a
7891c52cbf
test: update type snapshot
2021-12-19 22:44:45 +08:00
h-a-n-a
df9dc91562
feat(napi): add ts typegen skip
2021-12-19 19:45:21 +08:00
LongYinan
f577512952
fix(cli): disable js binding generation if no --platform flag
2021-12-18 15:40:38 +08:00
forehalo
09c7df3c5c
fix: keep .d.ts and .js untouched if native doesn't change
2021-12-18 14:12:46 +08:00
LongYinan
f4b0a2e322
fix(cli): enum TypeScript type should be const enum
2021-12-09 18:48:50 +08:00
LongYinan
11a5a35485
feat(cli): workaround for Windows i686 ICE in dev mode
2021-12-07 21:45:01 +08:00
LongYinan
8de30a9287
feat(napi): add -p flag which will be bypassed to cargo
2021-12-03 16:49:25 +08:00
LongYinan
d58e488fa2
fix(cli): missing exported enum
2021-12-02 15:46:20 +08:00
Tim Fish
18d2743862
feat(napi): output Rust doc comments in definitions as jsdoc comments
2021-11-29 12:54:45 +08:00
LongYinan
1fe39ff66d
feat(napi): support export rust mod as ts namespace
2021-11-25 17:53:43 +08:00
LongYinan
7b797d3caf
feat(cli): create pre-release if tag includes alpha/beta/rc
2021-11-21 21:43:28 +08:00
LongYinan
1f64f9fbf3
fix(cli): ExternalObject type decalare
2021-11-21 18:23:53 +08:00
LongYinan
bdfb1506a2
feat(napi): implement external value
2021-11-21 16:24:58 +08:00
LongYinan
4c3fe26478
feat(cli): refactor cli build
2021-11-19 18:22:40 +08:00
LongYinan
e37c3fd908
feat(napi): add pipe flag to pipe the generated files into custom command
2021-11-16 13:58:01 +08:00
yisibl
753bb1e31b
fix: always add a newline at the end of the file when generating js-binding.js
2021-11-16 13:10:03 +08:00
LongYinan
179f20a7c5
feat(cli): generate js binding to avoid dynamic require logic
2021-11-09 21:43:51 +08:00
forehalo
5b39035541
serde support
2021-10-27 14:42:57 +08:00
forehalo
f4c0b0639b
impl To/FromNapiValue for HashMap
2021-10-27 14:42:57 +08:00
LongYinan
0e8de173a4
feat(cli): dts flag for build command
2021-10-01 15:01:23 +08:00
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
e90ea9304a
fix(cli): create dist dir if not existed while building
2021-08-09 06:18:03 +00:00
LongYinan
67ad0a4d4d
feat(cli): upgrade clipanion v3
...
Remove napi new command
2021-08-07 00:23:17 +08:00