Skip to content

Commit 9004396

Browse files
authored
feat: native-tls (#427)
* feat: add support for building native-tls version * feat: add support in py-build-backend as well * remove unused edits
1 parent f85a2b4 commit 9004396

File tree

10 files changed

+253
-7
lines changed

10 files changed

+253
-7
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ marked-yaml = "0.8.0"
2828
miette = "7.5.0"
2929
minijinja = "2.7.0"
3030
parking_lot = "0.12.3"
31-
reqwest = { version = "0.12.12", default-features = false, features = [
32-
"rustls-tls",
33-
"rustls-tls-native-roots",
34-
] }
31+
reqwest = { version = "0.12.12", default-features = false }
3532
reqwest-middleware = "0.4.0"
3633
rstest = "0.26.0"
3734
serde = "1.0"
@@ -54,9 +51,7 @@ jsonrpc-stdio-server = "18.0.0"
5451
jsonrpc-http-server = "18.0.0"
5552
jsonrpc-core = "18.0.0"
5653

57-
rattler-build = { git = "https://github.com/prefix-dev/rattler-build", branch = "main", default-features = false, features = [
58-
"rustls-tls",
59-
] }
54+
rattler-build = { git = "https://github.com/prefix-dev/rattler-build", branch = "main", default-features = false }
6055

6156
file_url = "0.2.5"
6257
rattler_conda_types = { version = "0.40.0", default-features = false }

crates/pixi-build-backend/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ name = "pixi-build-backend"
33
version = "0.1.3"
44
edition.workspace = true
55

6+
[features]
7+
default = ["rustls-tls"]
8+
# Use rustls for TLS (pure Rust implementation)
9+
rustls-tls = [
10+
"reqwest/rustls-tls",
11+
"reqwest/rustls-tls-native-roots",
12+
"rattler-build/rustls-tls",
13+
]
14+
# Use native-tls/OpenSSL for TLS
15+
native-tls = ["reqwest/native-tls", "rattler-build/native-tls"]
16+
617
[dependencies]
718
async-trait = { workspace = true }
819
chrono = { workspace = true }

crates/pixi-build-cmake/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ version = "0.3.3"
44
description = "CMake build backend for Pixi"
55
edition.workspace = true
66

7+
[features]
8+
default = ["rustls-tls"]
9+
rustls-tls = ["pixi-build-backend/rustls-tls", "rattler-build/rustls-tls"]
10+
native-tls = ["pixi-build-backend/native-tls", "rattler-build/native-tls"]
11+
712
[dependencies]
813
indexmap = { workspace = true }
914
miette = { workspace = true }

crates/pixi-build-mojo/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name = "pixi-build-mojo"
33
version = "0.1.3"
44
edition.workspace = true
55

6+
[features]
7+
default = ["rustls-tls"]
8+
rustls-tls = ["pixi-build-backend/rustls-tls", "rattler-build/rustls-tls"]
9+
native-tls = ["pixi-build-backend/native-tls", "rattler-build/native-tls"]
10+
611
[dependencies]
712
indexmap = { workspace = true }
813
miette = { workspace = true }

crates/pixi-build-python/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name = "pixi-build-python"
33
version = "0.4.0"
44
edition.workspace = true
55

6+
[features]
7+
default = ["rustls-tls"]
8+
rustls-tls = ["pixi-build-backend/rustls-tls"]
9+
native-tls = ["pixi-build-backend/native-tls"]
10+
611
[dependencies]
712
indexmap = { workspace = true }
813
miette = { workspace = true }

crates/pixi-build-rattler-build/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name = "pixi-build-rattler-build"
33
version = "0.3.3"
44
edition.workspace = true
55

6+
[features]
7+
default = ["rustls-tls"]
8+
rustls-tls = ["pixi-build-backend/rustls-tls", "rattler-build/rustls-tls"]
9+
native-tls = ["pixi-build-backend/native-tls", "rattler-build/native-tls"]
10+
611
[dependencies]
712
async-trait = { workspace = true }
813
fs-err = { workspace = true }

crates/pixi-build-rust/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ repository.workspace = true
77
license.workspace = true
88
edition.workspace = true
99

10+
[features]
11+
default = ["rustls-tls"]
12+
rustls-tls = ["pixi-build-backend/rustls-tls"]
13+
native-tls = ["pixi-build-backend/native-tls"]
14+
1015
[dependencies]
1116
fs-err = { workspace = true }
1217
indexmap = { workspace = true }

0 commit comments

Comments
 (0)