git.delta.rocks / jrsonnet / refs/commits / 8e03fa373e9c

difftreelog

refactor init rustls in jrb binary instead

sklkyrqwYaroslav Bolyukin2026-05-08parent: #b5082ff.patch.diff
in: master

4 files changed

modifiedCargo.lockdiffbeforeafterboth
2392dependencies = [2392dependencies = [
2393 "clap",2393 "clap",
2394 "jrsonnet-pkg",2394 "jrsonnet-pkg",
2395 "rustls",
2395 "serde",2396 "serde",
2396 "serde_json",2397 "serde_json",
2397 "tracing",2398 "tracing",
2578 "gix",2579 "gix",
2579 "peg",2580 "peg",
2580 "reqwest",2581 "reqwest",
2581 "rustls",
2582 "serde",2582 "serde",
2583 "serde_json",2583 "serde_json",
2584 "thiserror",2584 "thiserror",
modifiedcmds/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"] }
modifiedcmds/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 {
modifiedcrates/jrsonnet-pkg/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-pkg/Cargo.toml
+++ b/crates/jrsonnet-pkg/Cargo.toml
@@ -26,9 +26,5 @@
 url.workspace = true
 camino.workspace = true
 
-# 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"] }
-
 # Global cache dir
 directories.workspace = true