Skip to content

Commit 144b67b

Browse files
committed
Support building without default features
1 parent 484afea commit 144b67b

5 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
path: target
5959
key: clippy-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
6060
- name: Run clippy
61-
run: cargo clippy --all --all-targets
61+
run: cargo clippy --all --all-targets --features rpk,mlkem
6262
- name: Check docs
6363
run: cargo doc --no-deps -p boring -p boring-sys -p hyper-boring -p tokio-boring --features rpk,underscore-wildcards
6464
env:
@@ -415,9 +415,15 @@ jobs:
415415
- name: Install Rust (rustup)
416416
run: rustup update stable --no-self-update && rustup default stable
417417
shell: bash
418+
- run: cargo check --no-default-features
419+
name: Check `--no-default-features`
420+
- run: cargo check --features mlkem,credential
421+
name: Check `mlkem,credential`
418422
- run: cargo test --features rpk
419423
name: Run `rpk` tests
420424
- run: cargo test --features underscore-wildcards
421425
name: Run `underscore-wildcards` tests
422426
- run: cargo test --features rpk,underscore-wildcards
423427
name: Run `rpk,underscore-wildcards` tests
428+
- run: cargo test --features rpk,underscore-wildcards,mlkem
429+
name: Run `rpk,underscore-wildcards` tests

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ tag-prefix = ""
2020
publish = false
2121

2222
[workspace.dependencies]
23-
boring-sys = { version = "5.0.0", path = "./boring-sys" }
24-
boring = { version = "5.0.0", path = "./boring" }
25-
tokio-boring = { version = "5.0.0", path = "./tokio-boring" }
23+
boring-sys = { version = "5.0.0", path = "./boring-sys", default-features = false }
24+
boring = { version = "5.0.0", path = "./boring", default-features = false }
25+
tokio-boring = { version = "5.0.0", path = "./tokio-boring", default-features = false }
2626

2727
bindgen = { version = "0.72.0", default-features = false, features = ["runtime"] }
2828
bitflags = "2.9"

boring/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ features = ["rpk", "underscore-wildcards"]
1717
rustdoc-args = ["--cfg", "docsrs"]
1818

1919
[features]
20-
# Controlling the build
20+
default = []
2121

2222
# Use a FIPS-validated version of BoringSSL.
2323
fips = ["boring-sys/fips"]

hyper-boring/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ features = []
1616
rustdoc-args = ["--cfg", "docsrs"]
1717

1818
[features]
19+
default = ["boring/default", "tokio-boring/default"]
20+
1921
# Use a FIPS-validated version of boringssl.
2022
fips = ["boring/fips", "tokio-boring/fips"]
2123

@@ -25,9 +27,9 @@ http = { workspace = true }
2527
hyper = { workspace = true }
2628
hyper-util = { workspace = true, features = ["client", "client-legacy"] }
2729
linked_hash_set = { workspace = true }
28-
boring = { workspace = true }
30+
boring = { workspace = true, default-features = false }
2931
tokio = { workspace = true }
30-
tokio-boring = { workspace = true }
32+
tokio-boring = { workspace = true, default-features = false }
3133
tower-layer = { workspace = true }
3234
tower-service = { workspace = true }
3335

tokio-boring/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ features = ["rpk"]
1717
rustdoc-args = ["--cfg", "docsrs"]
1818

1919
[features]
20+
default = ["boring/default"]
21+
2022
# Use a FIPS-validated version of boringssl.
2123
fips = ["boring/fips", "boring-sys/fips"]
2224

2325
# Enables Raw public key API (https://datatracker.ietf.org/doc/html/rfc7250)
2426
rpk = ["boring/rpk"]
2527

2628
[dependencies]
27-
boring = { workspace = true }
28-
boring-sys = { workspace = true }
29+
boring = { workspace = true, default-features = false }
30+
boring-sys = { workspace = true, default-features = false }
2931
tokio = { workspace = true }
3032

3133
[dev-dependencies]

0 commit comments

Comments
 (0)