Skip to content

Commit 2659ca1

Browse files
authored
feat(cli): add rustls as default Cargo feature (#6900)
1 parent 24490bc commit 2659ca1

File tree

6 files changed

+22
-19
lines changed

6 files changed

+22
-19
lines changed

.changes/rustls-default.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Add `rustls` as default Cargo feature.

.github/workflows/publish-cli-js.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,41 +30,41 @@ jobs:
3030
target: x86_64-apple-darwin
3131
architecture: x64
3232
build: |
33-
yarn build:release --features rustls
33+
yarn build:release
3434
strip -x *.node
3535
- host: windows-latest
36-
build: yarn build:release --features rustls
36+
build: yarn build:release
3737
target: x86_64-pc-windows-msvc
3838
architecture: x64
3939
- host: windows-latest
40-
build: yarn build:release --features rustls --target i686-pc-windows-msvc
40+
build: yarn build:release --target i686-pc-windows-msvc
4141
target: i686-pc-windows-msvc
4242
architecture: x64
4343
- host: ubuntu-20.04
4444
target: x86_64-unknown-linux-gnu
4545
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
4646
build: |
4747
cd tooling/cli/node
48-
yarn build:release --features rustls --target x86_64-unknown-linux-gnu
48+
yarn build:release --target x86_64-unknown-linux-gnu
4949
strip *.node
5050
- host: ubuntu-20.04
5151
target: x86_64-unknown-linux-musl
5252
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
5353
build: |
5454
cd tooling/cli/node
55-
yarn build:release --features rustls
55+
yarn build:release
5656
strip *.node
5757
- host: macos-latest
5858
target: aarch64-apple-darwin
5959
build: |
60-
yarn build:release --features rustls --target=aarch64-apple-darwin
60+
yarn build:release --target=aarch64-apple-darwin
6161
strip -x *.node
6262
- host: ubuntu-20.04
6363
target: aarch64-unknown-linux-gnu
6464
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
6565
build: |
6666
cd tooling/cli/node
67-
yarn build:release --features rustls --target aarch64-unknown-linux-gnu
67+
yarn build:release --target aarch64-unknown-linux-gnu
6868
aarch64-unknown-linux-gnu-strip *.node
6969
- host: ubuntu-20.04
7070
architecture: x64
@@ -73,7 +73,7 @@ jobs:
7373
sudo apt-get update
7474
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
7575
build: |
76-
yarn build:release --features rustls --target=armv7-unknown-linux-gnueabihf
76+
yarn build:release --target=armv7-unknown-linux-gnueabihf
7777
arm-linux-gnueabihf-strip *.node
7878
- host: ubuntu-20.04
7979
architecture: x64
@@ -82,12 +82,12 @@ jobs:
8282
build: |
8383
cd tooling/cli/node
8484
rustup target add aarch64-unknown-linux-musl
85-
yarn build:release --features rustls --target aarch64-unknown-linux-musl
85+
yarn build:release --target aarch64-unknown-linux-musl
8686
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
8787
#- host: windows-latest
8888
# architecture: x64
8989
# target: aarch64-pc-windows-msvc
90-
# build: yarn build:release --features rustls --target aarch64-pc-windows-msvc
90+
# build: yarn build:release --target aarch64-pc-windows-msvc
9191
name: stable - ${{ matrix.settings.target }} - node@16
9292
runs-on: ${{ matrix.settings.host }}
9393
steps:
@@ -179,7 +179,7 @@ jobs:
179179
# freebsd-version
180180
# cd ./tooling/cli/node/
181181
# yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
182-
# yarn build:release --features rustls
182+
# yarn build:release
183183
# strip -x *.node
184184
# rm -rf node_modules
185185
# rm -rf ../target

tooling/bundler/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ name = "tauri_bundler"
6464
path = "src/lib.rs"
6565

6666
[features]
67-
default = [ "attohttpc/default" ]
67+
default = [ "native-tls" ]
68+
native-tls = [ "attohttpc/tls-native" ]
6869
native-tls-vendored = [ "attohttpc/tls-native-vendored" ]
6970
rustls = [ "attohttpc/rustls" ]

tooling/cli/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/cli/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ libc = "0.2"
9292
lto = true
9393

9494
[features]
95-
default = [ "tauri-bundler/default" ]
95+
default = [ "rustls" ]
96+
native-tls = [ "tauri-bundler/native-tls" ]
9697
native-tls-vendored = [ "tauri-bundler/native-tls-vendored" ]
9798
rustls = [ "tauri-bundler/rustls" ]

tooling/cli/node/Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ crate-type = ["cdylib"]
1010
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
1111
napi = { version = "2.12", default-features = false, features = ["napi4"] }
1212
napi-derive = "2.12"
13-
tauri-cli = { path = "..", default-features = false }
13+
tauri-cli = { path = ".." }
1414
log = "0.4.17"
1515

1616
[build-dependencies]
1717
napi-build = "2.0"
18-
19-
[features]
20-
native-tls-vendored = ["tauri-cli/native-tls-vendored"]
21-
rustls = ["tauri-cli/rustls"]

0 commit comments

Comments
 (0)