Commit c4e191d
committed
perf(deps): drop aws-lc-rs from non-FIPS builds, use ring backend
Bottlecap previously enabled `rustls/aws-lc-rs` directly AND pulled
ring transitively via `libdd-common/https`, so default builds
linked both crypto backends and shipped ~1.5 MiB of unused machine
code (aws-lc-sys alone is ~543 KiB stripped per cargo-bloat).
Switch to a single provider per mode:
* default: ring (the libdatadog default — comes via
libdd-common/https → rustls/ring + hyper-rustls/ring).
* fips: aws-lc-rs (FIPS-validated — comes via rustls/fips +
libdd-common/fips → hyper-rustls/fips).
Drops the hardcoded `aws-lc-rs` feature on the rustls direct dep and
makes the explicit `default_provider().install_default()` calls in
http_client.rs and trace_processor.rs cfg-conditional on the
bottlecap `fips` feature.
Verified via `cargo tree`:
* `--features default`: ring ✓ pulled, aws-lc-rs ✗ absent
* `--no-default-features --features fips`: aws-lc-rs ✓ pulled,
ring ✗ absent
Production layer build (arm64, non-FIPS):
bottlecap stripped: 11,709,896 → 10,137,032 B (−1,572,864 B, −13.4%)
layer zip: 5,324,844 → 4,528,013 B ( −796,831 B, −15.0%)1 parent 3d4c862 commit c4e191d
3 files changed
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
82 | 90 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| 640 | + | |
640 | 641 | | |
| 642 | + | |
| 643 | + | |
641 | 644 | | |
642 | 645 | | |
643 | 646 | | |
| |||
0 commit comments