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
--- 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",
modifiedcmds/jrb/Cargo.tomldiffbeforeafterboth
before · cmds/jrb/Cargo.toml
1[package]2name = "jrb"3description = "jsonnet package manager"4authors.workspace = true5edition.workspace = true6license.workspace = true7repository.workspace = true8version.workspace = true910[lints]11workspace = true1213[dependencies]14jrsonnet-pkg.workspace = true1516clap = { workspace = true, features = ["derive"] }17serde = { workspace = true }18serde_json.workspace = true19tracing.workspace = true20tracing-subscriber.workspace = true
after · cmds/jrb/Cargo.toml
1[package]2name = "jrb"3description = "jsonnet package manager"4authors.workspace = true5edition.workspace = true6license.workspace = true7repository.workspace = true8version.workspace = true910[lints]11workspace = true1213[dependencies]14jrsonnet-pkg.workspace = true1516clap = { workspace = true, features = ["derive"] }17serde = { workspace = true }18serde_json.workspace = true19tracing.workspace = true20tracing-subscriber.workspace = true2122# jrsonnet-pkg wants a rustls provider.23# ring is not ideal and not recommended by rustls authors... But is easiest to build,24# and there should be little risk for bundling use case25rustls = { 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