Skip to content

Commit

Permalink
make vendored openssl build optional via a feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pinnouse committed Mar 14, 2023
1 parent f50d2ce commit 7c1315b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
with:
use-cross: true
command: build
args: --release --target ${{ matrix.platform }}
args: --release --features "vendored-openssl" --target ${{ matrix.platform }}

# on windows it's ./target/release/main.exe
# on linux it's ./target/release/main
Expand Down
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ts-rs = "6.2.1"
walkdir = "2.3.2"
whoami = "1.2.3"
zip = "0.6.2"
openssl = { version = "0.10.45", features = ["vendored"] }
openssl = { version = "0.10.45", features = ["vendored"], optional = true }
flate2 = "1.0.24"
tar = "0.4.38"
unrar = "0.4.4"
Expand All @@ -95,3 +95,6 @@ features = [
"fast-rng", # Use a faster (but still sufficiently random) RNG
"macro-diagnostics", # Enable better diagnostics for compile-time UUIDs
]

[features]
vendored-openssl = ["dep:openssl"]
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR /app
COPY . ./

# build app using 'release' profile
RUN cargo build --release
RUN cargo build --release --features "vendored-openssl"

FROM debian:bullseye-slim as production

Expand Down

0 comments on commit 7c1315b

Please sign in to comment.