difftreelog
refactor init rustls in jrb binary instead
in: master
4 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2392,6 +2392,7 @@
dependencies = [
"clap",
"jrsonnet-pkg",
+ "rustls",
"serde",
"serde_json",
"tracing",
@@ -2578,7 +2579,6 @@
"gix",
"peg",
"reqwest",
- "rustls",
"serde",
"serde_json",
"thiserror",
cmds/jrb/Cargo.tomldiffbeforeafterboth--- a/cmds/jrb/Cargo.toml
+++ b/cmds/jrb/Cargo.toml
@@ -18,3 +18,8 @@
serde_json.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
+
+# jrsonnet-pkg wants a rustls provider.
+# ring is not ideal and not recommended by rustls authors... But is easiest to build,
+# and there should be little risk for bundling use case
+rustls = { workspace = true, features = ["ring"] }
cmds/jrb/src/main.rsdiffbeforeafterboth--- a/cmds/jrb/src/main.rs
+++ b/cmds/jrb/src/main.rs
@@ -108,6 +108,10 @@
fn main() {
tracing_subscriber::fmt().init();
+ rustls::crypto::ring::default_provider()
+ .install_default()
+ .expect("install rustls crypto provider");
+
let opts = Opts::parse();
match opts.command {
crates/jrsonnet-pkg/Cargo.tomldiffbeforeafterboth1[package]2name = "jrsonnet-pkg"3description = "jsonnet-bundler jsonnetfile parser and installer"4authors.workspace = true5edition.workspace = true6license.workspace = true7repository.workspace = true8version.workspace = true910[lints]11workspace = true1213[dependencies]14serde = { workspace = true, features = ["derive"] }15serde_json.workspace = true16thiserror.workspace = true17tracing.workspace = true1819# Source url parser20peg.workspace = true2122# Gix for git repos, reqwest + zip for github23gix = { workspace = true, features = ["blocking-http-transport-reqwest"] }24reqwest = { workspace = true, features = ["rustls-no-provider"] }25zip.workspace = true26url.workspace = true27camino.workspace = true2829# ring is not ideal and not recommended by rustls authors... But is easiest to build,30# and there should be little risk for bundling use case31rustls = { workspace = true, features = ["ring"] }3233# Global cache dir34directories.workspace = true