Skip to content

Commit

Permalink
feat(cli): add rustls as default Cargo feature (tauri-apps#6900)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored May 8, 2023
1 parent 24490bc commit 2659ca1
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .changes/rustls-default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Add `rustls` as default Cargo feature.
22 changes: 11 additions & 11 deletions .github/workflows/publish-cli-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,41 @@ jobs:
target: x86_64-apple-darwin
architecture: x64
build: |
yarn build:release --features rustls
yarn build:release
strip -x *.node
- host: windows-latest
build: yarn build:release --features rustls
build: yarn build:release
target: x86_64-pc-windows-msvc
architecture: x64
- host: windows-latest
build: yarn build:release --features rustls --target i686-pc-windows-msvc
build: yarn build:release --target i686-pc-windows-msvc
target: i686-pc-windows-msvc
architecture: x64
- host: ubuntu-20.04
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
cd tooling/cli/node
yarn build:release --features rustls --target x86_64-unknown-linux-gnu
yarn build:release --target x86_64-unknown-linux-gnu
strip *.node
- host: ubuntu-20.04
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd tooling/cli/node
yarn build:release --features rustls
yarn build:release
strip *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
yarn build:release --features rustls --target=aarch64-apple-darwin
yarn build:release --target=aarch64-apple-darwin
strip -x *.node
- host: ubuntu-20.04
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
cd tooling/cli/node
yarn build:release --features rustls --target aarch64-unknown-linux-gnu
yarn build:release --target aarch64-unknown-linux-gnu
aarch64-unknown-linux-gnu-strip *.node
- host: ubuntu-20.04
architecture: x64
Expand All @@ -73,7 +73,7 @@ jobs:
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
build: |
yarn build:release --features rustls --target=armv7-unknown-linux-gnueabihf
yarn build:release --target=armv7-unknown-linux-gnueabihf
arm-linux-gnueabihf-strip *.node
- host: ubuntu-20.04
architecture: x64
Expand All @@ -82,12 +82,12 @@ jobs:
build: |
cd tooling/cli/node
rustup target add aarch64-unknown-linux-musl
yarn build:release --features rustls --target aarch64-unknown-linux-musl
yarn build:release --target aarch64-unknown-linux-musl
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
#- host: windows-latest
# architecture: x64
# target: aarch64-pc-windows-msvc
# build: yarn build:release --features rustls --target aarch64-pc-windows-msvc
# build: yarn build:release --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
steps:
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
# freebsd-version
# cd ./tooling/cli/node/
# yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
# yarn build:release --features rustls
# yarn build:release
# strip -x *.node
# rm -rf node_modules
# rm -rf ../target
Expand Down
3 changes: 2 additions & 1 deletion tooling/bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ name = "tauri_bundler"
path = "src/lib.rs"

[features]
default = [ "attohttpc/default" ]
default = [ "native-tls" ]
native-tls = [ "attohttpc/tls-native" ]
native-tls-vendored = [ "attohttpc/tls-native-vendored" ]
rustls = [ "attohttpc/rustls" ]
1 change: 0 additions & 1 deletion tooling/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tooling/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ libc = "0.2"
lto = true

[features]
default = [ "tauri-bundler/default" ]
default = [ "rustls" ]
native-tls = [ "tauri-bundler/native-tls" ]
native-tls-vendored = [ "tauri-bundler/native-tls-vendored" ]
rustls = [ "tauri-bundler/rustls" ]
6 changes: 1 addition & 5 deletions tooling/cli/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ crate-type = ["cdylib"]
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { version = "2.12", default-features = false, features = ["napi4"] }
napi-derive = "2.12"
tauri-cli = { path = "..", default-features = false }
tauri-cli = { path = ".." }
log = "0.4.17"

[build-dependencies]
napi-build = "2.0"

[features]
native-tls-vendored = ["tauri-cli/native-tls-vendored"]
rustls = ["tauri-cli/rustls"]

0 comments on commit 2659ca1

Please sign in to comment.