From ee31f6ee06316d8799b9e07618e776aea1d31f4b Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Sun, 3 May 2026 23:16:20 +0200 Subject: [PATCH 01/29] bump msrv and update manifests --- Cargo.toml | 2 +- cli/src/lib.rs | 2 -- flake.lock | 10 +++--- flake.nix | 2 +- junos-agent/src/lib.rs | 2 -- junos-agent/src/policies/fetch.rs | 32 +++++++++---------- junos-agent/src/policies/load.rs | 4 +-- junos-agent/src/policies/mod.rs | 2 +- lib/src/lib.rs | 2 -- lib/src/query.rs | 3 +- netconf/src/capabilities.rs | 4 +-- netconf/src/lib.rs | 2 -- netconf/src/message/hello.rs | 6 ++-- netconf/src/message/mod.rs | 2 +- netconf/src/message/rpc/error.rs | 9 +++--- netconf/src/message/rpc/mod.rs | 14 ++++---- .../message/rpc/operation/cancel_commit.rs | 2 +- netconf/src/message/rpc/operation/commit.rs | 2 +- .../message/rpc/operation/delete_config.rs | 2 +- .../src/message/rpc/operation/edit_config.rs | 6 ++-- netconf/src/message/rpc/operation/get.rs | 2 +- .../src/message/rpc/operation/get_config.rs | 2 +- .../operation/junos/commit_configuration.rs | 1 + .../rpc/operation/junos/load_configuration.rs | 4 +-- .../src/message/rpc/operation/junos/mod.rs | 2 +- netconf/src/message/rpc/operation/mod.rs | 2 +- netconf/src/session.rs | 13 ++++---- netconf/src/transport/ssh.rs | 6 ++-- 28 files changed, 67 insertions(+), 75 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 79cc2f5..3dc5706 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [workspace.package] version = "0.1.0" edition = "2021" -rust-version = "1.75" +rust-version = "1.87" authors = ["Ben Maddison "] description = "A toolset for working with IRR data" license = "MIT" diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 9fc1585..aec2efb 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -7,7 +7,6 @@ #![allow(clippy::redundant_pub_crate)] #![allow(clippy::multiple_crate_versions)] // rustc lints -#![allow(box_pointers)] #![warn(absolute_paths_not_starting_with_crate)] #![warn(deprecated_in_future)] #![warn(elided_lifetimes_in_paths)] @@ -21,7 +20,6 @@ #![warn(missing_docs)] #![warn(non_ascii_idents)] #![warn(noop_method_call)] -#![warn(pointer_structural_match)] #![warn(rust_2021_incompatible_closure_captures)] #![warn(rust_2021_incompatible_or_patterns)] #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/flake.lock b/flake.lock index b55e61b..c55e361 100644 --- a/flake.lock +++ b/flake.lock @@ -95,19 +95,19 @@ "msrv-manifest": { "flake": false, "locked": { - "narHash": "sha256-K9HAIB0ivQmPpCuWhuZPCBns4qir8hVp9FgcCxDDsXg=", + "narHash": "sha256-BwfxWd/E8gpnXoKsucFXhMbevMlVgw3l0becLkIcWCU=", "type": "file", - "url": "https://static.rust-lang.org/dist/channel-rust-1.75.toml" + "url": "https://static.rust-lang.org/dist/channel-rust-1.87.toml" }, "original": { "type": "file", - "url": "https://static.rust-lang.org/dist/channel-rust-1.75.toml" + "url": "https://static.rust-lang.org/dist/channel-rust-1.87.toml" } }, "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-A7CxdE+jzg3eM2TvzVRYWGBAaFHErerXNkyxRZnGlx8=", + "narHash": "sha256-pq51dW3BxtIAeqGQNJuNLSc8AB3ubEghxYuY9rcud7M=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, @@ -165,7 +165,7 @@ "stable-manifest": { "flake": false, "locked": { - "narHash": "sha256-aZFye4UrtlcvLHrISldx4g9uGt3thDbVlLMK5keBSj0=", + "narHash": "sha256-gOowX/J8r9U9Y3H0PNdAUI0W/e6BGX3tsWh/bA+SnpQ=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-stable.toml" }, diff --git a/flake.nix b/flake.nix index 1b17902..58405ba 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ flake = false; }; msrv-manifest = { - url = "https://static.rust-lang.org/dist/channel-rust-1.75.toml"; + url = "https://static.rust-lang.org/dist/channel-rust-1.87.toml"; flake = false; }; advisory-db = { diff --git a/junos-agent/src/lib.rs b/junos-agent/src/lib.rs index fe9ff79..b8161e9 100644 --- a/junos-agent/src/lib.rs +++ b/junos-agent/src/lib.rs @@ -7,7 +7,6 @@ #![allow(clippy::redundant_pub_crate)] #![allow(clippy::multiple_crate_versions)] // rustc lints -#![allow(box_pointers)] #![warn(absolute_paths_not_starting_with_crate)] #![warn(deprecated_in_future)] #![warn(elided_lifetimes_in_paths)] @@ -21,7 +20,6 @@ #![warn(missing_docs)] #![warn(non_ascii_idents)] #![warn(noop_method_call)] -#![warn(pointer_structural_match)] #![warn(rust_2021_incompatible_closure_captures)] #![warn(rust_2021_incompatible_or_patterns)] #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/junos-agent/src/policies/fetch.rs b/junos-agent/src/policies/fetch.rs index 2df7f36..7fcd59c 100644 --- a/junos-agent/src/policies/fetch.rs +++ b/junos-agent/src/policies/fetch.rs @@ -92,10 +92,10 @@ where let err = anyhow!("detected duplicate policy-statement '{name}'"); tracing::error!(%err); return Err(ReadError::Other(err.into())); - }; + } } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -106,7 +106,7 @@ where } } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -116,7 +116,7 @@ where } this = Some(Self { map }); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -167,10 +167,10 @@ impl ReadXml for Maybe { Some((raw, Err(err))) => { tracing::warn!("skipping malformed filter expression '{raw}': {err}"); } - None => continue, + None => (), } } - _ => continue, + _ => (), } } let Some(filter_expr) = maybe_filter_expr else { @@ -198,7 +198,7 @@ impl ReadXml for Maybe { { reject_policy = true; } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -207,7 +207,7 @@ impl ReadXml for Maybe { } } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -277,7 +277,7 @@ impl ReadXml for Maybe { { default_reject = true; } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -286,7 +286,7 @@ impl ReadXml for Maybe { } } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -365,7 +365,7 @@ impl<'i> BorrowedReadXml<'i> for Term<'i> { tracing::trace!(?tag); accept = true; } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -382,7 +382,7 @@ impl<'i> BorrowedReadXml<'i> for Term<'i> { }); } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -433,7 +433,7 @@ impl TermFrom<'_> { anyhow!("can't parse '{family}' term into {afi} prefix-ranges",).into(), )) } - }; + } self.route_filters .iter() .map(|route_filter| { @@ -486,7 +486,7 @@ impl<'i> BorrowedReadXml<'i> for TermFrom<'i> { let route_filter = RouteFilter::borrowed_read_xml(reader, &tag)?; route_filters.push(route_filter); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -545,7 +545,7 @@ impl<'i> BorrowedReadXml<'i> for RouteFilter<'i> { prefix_length_range = Some(reader.read_text(tag.to_end().name())?); break; } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); return Err(ReadError::UnexpectedXmlEvent(event.into_owned())); @@ -553,7 +553,7 @@ impl<'i> BorrowedReadXml<'i> for RouteFilter<'i> { } } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); diff --git a/junos-agent/src/policies/load.rs b/junos-agent/src/policies/load.rs index 860d369..339c39c 100644 --- a/junos-agent/src/policies/load.rs +++ b/junos-agent/src/policies/load.rs @@ -121,7 +121,7 @@ impl WriteXml for Differences<'_, A> { write_route_filter::<_, A>(writer, range, false) })?; } - }; + } Ok::<_, WriteError>(()) })?; _ = writer @@ -129,7 +129,7 @@ impl WriteXml for Differences<'_, A> { .write_inner_content(|writer| { writer.create_element("accept").write_empty().map(|_| ()) })?; - }; + } Ok::<_, WriteError>(()) })?; Ok(()) diff --git a/junos-agent/src/policies/mod.rs b/junos-agent/src/policies/mod.rs index ea14675..a7501c4 100644 --- a/junos-agent/src/policies/mod.rs +++ b/junos-agent/src/policies/mod.rs @@ -124,7 +124,7 @@ impl Ranges { self.inner.iter() } - fn diff<'a>(&'a self, other: &'a Self) -> impl Iterator> { + fn diff<'a>(&'a self, other: &'a Self) -> impl Iterator> { self.inner.difference(&other.inner) } } diff --git a/lib/src/lib.rs b/lib/src/lib.rs index df6269e..f399430 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -7,7 +7,6 @@ #![allow(clippy::redundant_pub_crate)] #![allow(clippy::multiple_crate_versions)] // rustc lints -#![allow(box_pointers)] #![warn(absolute_paths_not_starting_with_crate)] #![warn(deprecated_in_future)] #![warn(elided_lifetimes_in_paths)] @@ -21,7 +20,6 @@ #![warn(missing_docs)] #![warn(non_ascii_idents)] #![warn(noop_method_call)] -#![warn(pointer_structural_match)] #![warn(rust_2021_incompatible_closure_captures)] #![warn(rust_2021_incompatible_or_patterns)] #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/lib/src/query.rs b/lib/src/query.rs index 7e7f86a..1466d2c 100644 --- a/lib/src/query.rs +++ b/lib/src/query.rs @@ -85,7 +85,8 @@ impl RpslEvaluator { } impl<'a> Evaluator<'a> for RpslEvaluator { - type Output = >::Output + type Output + = >::Output where T: Evaluate<'a, Self>; diff --git a/netconf/src/capabilities.rs b/netconf/src/capabilities.rs index bf0f519..b5dfaee 100644 --- a/netconf/src/capabilities.rs +++ b/netconf/src/capabilities.rs @@ -305,14 +305,14 @@ impl Display for Requirements { let mut iter = requirements.iter(); if let Some(first) = iter.next() { write!(f, "any of '{first}'")?; - }; + } iter.try_for_each(|requirement| write!(f, ", '{requirement}'")) } Self::All(requirements) => { let mut iter = requirements.iter(); if let Some(first) = iter.next() { write!(f, "all of '{first}'")?; - }; + } iter.try_for_each(|requirement| write!(f, ", '{requirement}'")) } } diff --git a/netconf/src/lib.rs b/netconf/src/lib.rs index adb9171..3e5744e 100644 --- a/netconf/src/lib.rs +++ b/netconf/src/lib.rs @@ -7,7 +7,6 @@ #![allow(clippy::redundant_pub_crate)] #![allow(clippy::multiple_crate_versions)] // rustc lints -#![allow(box_pointers)] #![warn(absolute_paths_not_starting_with_crate)] #![warn(deprecated_in_future)] #![warn(elided_lifetimes_in_paths)] @@ -21,7 +20,6 @@ #![warn(missing_docs)] #![warn(non_ascii_idents)] #![warn(noop_method_call)] -#![warn(pointer_structural_match)] #![warn(rust_2021_incompatible_closure_captures)] #![warn(rust_2021_incompatible_or_patterns)] #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/netconf/src/message/hello.rs b/netconf/src/message/hello.rs index 9e2ce82..08e2a32 100644 --- a/netconf/src/message/hello.rs +++ b/netconf/src/message/hello.rs @@ -56,15 +56,13 @@ impl ReadXml for ServerHello { session_id = Some(span.parse()?); tracing::debug!(?session_id); } - (_, Event::Comment(_)) => { - continue; - } + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); return Err(ReadError::UnexpectedXmlEvent(event.into_owned())); } - }; + } } Ok(Self { capabilities: capabilities diff --git a/netconf/src/message/mod.rs b/netconf/src/message/mod.rs index 58673ac..458d407 100644 --- a/netconf/src/message/mod.rs +++ b/netconf/src/message/mod.rs @@ -75,7 +75,7 @@ pub trait ServerMsg: ReadXml { { this = Some(Self::read_xml(&mut reader, &tag)?); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::Eof) => break, (_, Event::Text(txt)) if &*txt == MARKER => break, // TODO: diff --git a/netconf/src/message/rpc/error.rs b/netconf/src/message/rpc/error.rs index 83dd6dd..3b9e19f 100644 --- a/netconf/src/message/rpc/error.rs +++ b/netconf/src/message/rpc/error.rs @@ -26,12 +26,12 @@ impl Errors { } #[must_use] - pub fn is_empty(&self) -> bool { + pub const fn is_empty(&self) -> bool { self.inner.is_empty() } #[must_use] - pub fn len(&self) -> usize { + pub const fn len(&self) -> usize { self.inner.len() } @@ -52,6 +52,7 @@ impl fmt::Display for Errors { impl std::error::Error for Errors {} +#[allow(clippy::struct_field_names)] #[derive(Debug, Clone, PartialEq, Eq)] pub struct Error { error_type: Type, @@ -150,7 +151,7 @@ impl ReadXml for Error { tracing::debug!(?tag); info = Some(Info::read_xml(reader, &tag)?); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -427,7 +428,7 @@ impl ReadXml for Info { } } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); diff --git a/netconf/src/message/rpc/mod.rs b/netconf/src/message/rpc/mod.rs index 951d7f1..6664686 100644 --- a/netconf/src/message/rpc/mod.rs +++ b/netconf/src/message/rpc/mod.rs @@ -18,7 +18,7 @@ pub(crate) use self::operation::Operation; pub struct MessageId(usize); impl MessageId { - pub(crate) fn increment(&mut self) -> Self { + pub(crate) const fn increment(&mut self) -> Self { self.0 += 1; *self } @@ -115,7 +115,7 @@ impl ReadXml for PartialReply { .transpose()?; _ = reader.read_to_end(end.name()); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::Eof) => break, (_, Event::Text(txt)) if &*txt == MARKER => break, (ns, event) => { @@ -172,7 +172,7 @@ impl TryFrom for Reply { value.message_id, this.message_id, )); - }; + } Ok(this) } } @@ -214,7 +214,7 @@ impl ReadXml for EmptyReply { tracing::debug!(?tag); errors.push(Error::read_xml(reader, &tag)?); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -222,7 +222,7 @@ impl ReadXml for EmptyReply { } } } - this.or_else(|| (!errors.is_empty()).then(|| Self::Errs(errors))) + this.or_else(|| (!errors.is_empty()).then_some(Self::Errs(errors))) .ok_or_else(|| ReadError::missing_element("rpc-reply", "ok/rpc-error")) } } @@ -269,7 +269,7 @@ impl ReadXml for DataReply { tracing::debug!(?tag); errors.push(Error::read_xml(reader, &tag)?); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -433,7 +433,7 @@ mod tests { .map_err(|err| ReadError::Other(err.into()))?, ); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); diff --git a/netconf/src/message/rpc/operation/cancel_commit.rs b/netconf/src/message/rpc/operation/cancel_commit.rs index 13b05dd..ca51765 100644 --- a/netconf/src/message/rpc/operation/cancel_commit.rs +++ b/netconf/src/message/rpc/operation/cancel_commit.rs @@ -36,7 +36,7 @@ impl WriteXml for CancelCommit { })?; } else { _ = elem.write_empty()?; - }; + } Ok(()) } } diff --git a/netconf/src/message/rpc/operation/commit.rs b/netconf/src/message/rpc/operation/commit.rs index 37b2181..f3da602 100644 --- a/netconf/src/message/rpc/operation/commit.rs +++ b/netconf/src/message/rpc/operation/commit.rs @@ -37,7 +37,7 @@ impl WriteXml for Commit { _ = writer .create_element("confirm-timeout") .write_text_content(self.confirm_timeout.seconds())?; - }; + } if let Some(ref token) = self.persist { _ = writer .create_element("persist") diff --git a/netconf/src/message/rpc/operation/delete_config.rs b/netconf/src/message/rpc/operation/delete_config.rs index efe55ae..e9a5c5c 100644 --- a/netconf/src/message/rpc/operation/delete_config.rs +++ b/netconf/src/message/rpc/operation/delete_config.rs @@ -44,7 +44,7 @@ impl Builder<'_> { pub fn target(mut self, target: Datastore) -> Result { if matches!(target, Datastore::Running) { return Err(Error::DeleteRunningConfig); - }; + } target.try_as_target(self.ctx).map(|target| { self.target.set(Target::Datastore(target)); self diff --git a/netconf/src/message/rpc/operation/edit_config.rs b/netconf/src/message/rpc/operation/edit_config.rs index ad22e88..5e9642e 100644 --- a/netconf/src/message/rpc/operation/edit_config.rs +++ b/netconf/src/message/rpc/operation/edit_config.rs @@ -45,17 +45,17 @@ where _ = writer .create_element("default-operation") .write_text_content(BytesText::new(self.default_operation.as_str()))?; - }; + } if self.error_option.is_non_default() { _ = writer .create_element("error-option") .write_text_content(BytesText::new(self.error_option.as_str()))?; - }; + } if self.test_option.is_non_default() { _ = writer .create_element("test-option") .write_text_content(BytesText::new(self.test_option.as_str()))?; - }; + } self.source.write_xml(writer)?; Ok(()) }) diff --git a/netconf/src/message/rpc/operation/get.rs b/netconf/src/message/rpc/operation/get.rs index 7e3208f..177d05f 100644 --- a/netconf/src/message/rpc/operation/get.rs +++ b/netconf/src/message/rpc/operation/get.rs @@ -26,7 +26,7 @@ impl WriteXml for Get { .write_inner_content(|writer| { if let Some(ref filter) = self.filter { filter.write_xml(writer)?; - }; + } Ok(()) }) .map(|_| ()) diff --git a/netconf/src/message/rpc/operation/get_config.rs b/netconf/src/message/rpc/operation/get_config.rs index 56f9759..bde602a 100644 --- a/netconf/src/message/rpc/operation/get_config.rs +++ b/netconf/src/message/rpc/operation/get_config.rs @@ -52,7 +52,7 @@ where .write_inner_content(|writer| self.source.write_xml(writer))?; if let Some(ref filter) = self.filter { filter.write_xml(writer)?; - }; + } Ok(()) }) .map(|_| ()) diff --git a/netconf/src/message/rpc/operation/junos/commit_configuration.rs b/netconf/src/message/rpc/operation/junos/commit_configuration.rs index 7b69ad7..1683832 100644 --- a/netconf/src/message/rpc/operation/junos/commit_configuration.rs +++ b/netconf/src/message/rpc/operation/junos/commit_configuration.rs @@ -22,6 +22,7 @@ use crate::{ /// See [Juniper documentation][junos-docs]. /// /// [junos-docs]: https://www.juniper.net/documentation/us/en/software/junos/netconf/junos-xml-protocol/topics/ref/tag/junos-xml-protocol-commit-configuration.html +#[allow(clippy::too_long_first_doc_paragraph)] #[derive(Debug, Clone)] pub struct CommitConfiguration { check: bool, diff --git a/netconf/src/message/rpc/operation/junos/load_configuration.rs b/netconf/src/message/rpc/operation/junos/load_configuration.rs index 5c4a659..fee1126 100644 --- a/netconf/src/message/rpc/operation/junos/load_configuration.rs +++ b/netconf/src/message/rpc/operation/junos/load_configuration.rs @@ -440,7 +440,7 @@ impl ReadXml for Reply { .map_err(|err| ReadError::Other(err.into()))?, ); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); @@ -449,7 +449,7 @@ impl ReadXml for Reply { } } } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); diff --git a/netconf/src/message/rpc/operation/junos/mod.rs b/netconf/src/message/rpc/operation/junos/mod.rs index 4588242..8046586 100644 --- a/netconf/src/message/rpc/operation/junos/mod.rs +++ b/netconf/src/message/rpc/operation/junos/mod.rs @@ -106,7 +106,7 @@ impl ReadXml for BareReply { tracing::debug!(?tag); errors.push(Error::read_xml(reader, &tag)?); } - (_, Event::Comment(_)) => continue, + (_, Event::Comment(_)) => (), (_, Event::End(tag)) if tag == end => break, (ns, event) => { tracing::error!(?event, ?ns, "unexpected xml event"); diff --git a/netconf/src/message/rpc/operation/mod.rs b/netconf/src/message/rpc/operation/mod.rs index 5739180..915101c 100644 --- a/netconf/src/message/rpc/operation/mod.rs +++ b/netconf/src/message/rpc/operation/mod.rs @@ -203,7 +203,7 @@ impl WriteXml for Source { })?; } Self::Url(url) => url.write_xml(writer)?, - }; + } Ok(()) } } diff --git a/netconf/src/session.rs b/netconf/src/session.rs index f5a04c4..3200582 100644 --- a/netconf/src/session.rs +++ b/netconf/src/session.rs @@ -274,7 +274,7 @@ impl Session { request.send(&mut *self.transport_tx.lock().await).await?; _ = entry.insert(OutstandingRequest::Pending); } - }; + } let requests = self.requests.clone(); let rx = self.transport_rx.clone(); Ok(Self::recv::(message_id, requests, rx)) @@ -296,20 +296,19 @@ impl Session { let mut rx_guard = rx.lock().await; tracing::trace!(?requests); tracing::debug!("checking for ready response"); - if let Some(partial) = requests + let maybe_partial = requests .lock() .await .get_mut(&message_id) .ok_or(Error::RequestNotFound { message_id })? - .take()? - { + .take()?; + if let Some(partial) = maybe_partial { tracing::debug!("found ready response"); let reply: rpc::Reply = partial.try_into()?; break reply.into_result(); - }; + } tracing::debug!("response to {message_id:?} not yet ready"); let reply = rpc::PartialReply::recv(&mut *rx_guard).await?; - #[allow(clippy::significant_drop_in_scrutinee)] match requests .lock() .await @@ -327,7 +326,7 @@ impl Session { tracing::debug!("storing response to {:?}", reply.message_id()); _ = mem::replace(pending, OutstandingRequest::Ready(reply)); } - }; + } drop(rx_guard); } } diff --git a/netconf/src/transport/ssh.rs b/netconf/src/transport/ssh.rs index 84ead86..2b6b40a 100644 --- a/netconf/src/transport/ssh.rs +++ b/netconf/src/transport/ssh.rs @@ -45,7 +45,7 @@ impl Ssh { .await? { return Err(Error::Authentication { username }); - }; + } tracing::info!("ssh authentication sucessful"); session }; @@ -75,7 +75,7 @@ impl Ssh { channel.data(data.as_ref()).await?; } else { break; - }; + } tracing::trace!("message sent"); } msg = channel.wait() => { @@ -93,7 +93,7 @@ impl Ssh { let message = in_buf.split_to(end).freeze(); in_queue_tx.send(message).await?; tracing::debug!("message data enqueued sucessfully"); - }; + } } ChannelMsg::Eof => { tracing::info!("got eof, hanging up"); From c1e06d5681425f90654d6a6dc7e5204e395b7a30 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Mon, 4 May 2026 00:09:25 +0200 Subject: [PATCH 02/29] add devShells --- flake.nix | 5 +++++ nix/rust/cargo.nix | 13 ++++++++++++- nix/rust/default.nix | 8 ++------ nix/rust/toolchains.nix | 1 + 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 58405ba..b7a318e 100644 --- a/flake.nix +++ b/flake.nix @@ -68,5 +68,10 @@ }; default = cli; }; + + devShells = rec { + inherit (rust.devShells) msrv stable nightly; + default = stable; + }; }); } diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 1833f29..0700ec2 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -9,6 +9,17 @@ let src = with baseLib; cleanCargoSource (path ./../..); + devShells = mapAttrs + (toolchainName: toolchain: + let + craneLib = mkLib toolchain; + in + craneLib.devShell { + inherit checks; + } + ) + toolchains; + commonArgs = { inherit src; pname = "bgpfu"; @@ -152,5 +163,5 @@ let defaultPlatform.mkPackage craneLib.buildPackage (baseArgs // { inherit passthru; }); in { - inherit buildBinWith checks; + inherit buildBinWith checks devShells; } diff --git a/nix/rust/default.nix b/nix/rust/default.nix index 6bd7a5f..ef00634 100644 --- a/nix/rust/default.nix +++ b/nix/rust/default.nix @@ -1,9 +1,5 @@ { pkgs, crane, fenix, platforms, nightly-manifest, stable-manifest, msrv-manifest, advisory-db }: let - inherit (pkgs) system lib; - inherit (builtins) removeAttrs readFile listToAttrs map; - inherit (lib) mapAttrsToList nameValuePair; - toolchainManifests = { nightly = nightly-manifest; stable = stable-manifest; @@ -19,12 +15,12 @@ let src = ./../..; }; - buildPackage = cargo.buildBinWith rec { + buildPackage = cargo.buildBinWith { inherit platforms; toolchainName = "stable"; }; in { - inherit (cargo) checks; + inherit (cargo) checks devShells; inherit buildPackage; } diff --git a/nix/rust/toolchains.nix b/nix/rust/toolchains.nix index 41fe1fe..6bb5421 100644 --- a/nix/rust/toolchains.nix +++ b/nix/rust/toolchains.nix @@ -26,6 +26,7 @@ let clippy rustfmt llvm-tools + rust-analyzer ] ++ crossComponents manifest; in From a249d64f18d3ec760531e1fe04f60977682aa601 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Mon, 4 May 2026 00:15:28 +0200 Subject: [PATCH 03/29] add `rust-src` to toolchains --- nix/rust/toolchains.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/rust/toolchains.nix b/nix/rust/toolchains.nix index 6bb5421..6c7d87c 100644 --- a/nix/rust/toolchains.nix +++ b/nix/rust/toolchains.nix @@ -27,6 +27,7 @@ let rustfmt llvm-tools rust-analyzer + rust-src ] ++ crossComponents manifest; in From f04c1965133176104ff3c70cc337e38749b10b27 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Mon, 18 May 2026 15:56:08 +0200 Subject: [PATCH 04/29] Maintenance updates - update toolchains - update dependencies - fix new lints - bump msrv - add `devShells` - update CI workflows --- .cargo/audit.toml | 2 + .github/workflows/cicd.yml | 23 +- Cargo.lock | 2683 ++++++++++++----- Cargo.toml | 15 +- deny.toml | 20 +- flake.lock | 51 +- flake.nix | 35 +- junos-agent/Cargo.toml | 8 +- junos-agent/src/policies/fetch.rs | 47 +- junos-agent/src/policies/load.rs | 21 +- junos-agent/src/task.rs | 2 +- netconf/Cargo.toml | 23 +- netconf/src/capabilities.rs | 10 +- netconf/src/message/error.rs | 14 +- netconf/src/message/hello.rs | 11 +- netconf/src/message/mod.rs | 10 +- netconf/src/message/rpc/error.rs | 66 +- netconf/src/message/rpc/mod.rs | 24 +- .../message/rpc/operation/cancel_commit.rs | 5 +- .../message/rpc/operation/close_session.rs | 6 +- netconf/src/message/rpc/operation/commit.rs | 10 +- .../src/message/rpc/operation/copy_config.rs | 8 +- .../message/rpc/operation/delete_config.rs | 8 +- .../message/rpc/operation/discard_changes.rs | 5 +- .../src/message/rpc/operation/edit_config.rs | 10 +- netconf/src/message/rpc/operation/get.rs | 6 +- .../src/message/rpc/operation/get_config.rs | 15 +- .../operation/junos/commit_configuration.rs | 21 +- .../rpc/operation/junos/load_configuration.rs | 46 +- .../src/message/rpc/operation/junos/mod.rs | 2 +- .../rpc/operation/junos/open_configuration.rs | 13 +- .../src/message/rpc/operation/kill_session.rs | 5 +- netconf/src/message/rpc/operation/lock.rs | 8 +- netconf/src/message/rpc/operation/mod.rs | 41 +- netconf/src/message/rpc/operation/validate.rs | 5 +- netconf/src/session.rs | 18 + netconf/src/transport/ssh.rs | 11 +- nix/platforms/junos/jetez.nix | 14 +- nix/rust/cargo.nix | 141 +- nix/rust/default.nix | 2 +- nix/rust/toolchains.nix | 27 +- 41 files changed, 2428 insertions(+), 1064 deletions(-) create mode 100644 .cargo/audit.toml diff --git a/.cargo/audit.toml b/.cargo/audit.toml new file mode 100644 index 0000000..dde09a6 --- /dev/null +++ b/.cargo/audit.toml @@ -0,0 +1,2 @@ +[advisories] +ignore = ["RUSTSEC-2023-0071"] diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 6ea3773..a25f2ec 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -35,6 +35,17 @@ jobs: secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + flake-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v17 + with: + name: wolcomm-public + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - run: nix flake check + build-junos-agent: name: build-junos-agent needs: @@ -43,11 +54,13 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: install nix - uses: cachix/install-nix-action@v26 - - name: enable nix cache - uses: DeterminateSystems/magic-nix-cache-action@v6 + uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v17 + with: + name: wolcomm-public + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: set-up signing certs run: | mkdir -p /tmp/certs @@ -77,7 +90,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: download build artifacts uses: actions/download-artifact@v4 with: diff --git a/Cargo.lock b/Cargo.lock index ee6cb78..127c1e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,30 +1,31 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] -name = "addr2line" -version = "0.21.0" +name = "adler2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] -name = "adler" -version = "1.0.2" +name = "aead" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common 0.1.7", + "generic-array 0.14.7", +] [[package]] name = "aead" -version = "0.5.2" +version = "0.6.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +checksum = "6b657e772794c6b04730ea897b66a058ccd866c16d1967da05eeeecec39043fe" dependencies = [ - "crypto-common", - "generic-array", + "crypto-common 0.2.1", + "inout 0.2.2", ] [[package]] @@ -34,8 +35,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher", - "cpufeatures", + "cipher 0.4.4", + "cpufeatures 0.2.17", +] + +[[package]] +name = "aes" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66bd29a732b644c0431c6140f370d097879203d79b80c94a6747ba0872adaef8" +dependencies = [ + "cipher 0.5.1", + "cpubits", + "cpufeatures 0.3.0", ] [[package]] @@ -44,28 +56,36 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", + "aead 0.5.2", + "aes 0.8.4", + "cipher 0.4.4", + "ctr 0.9.2", + "ghash 0.5.1", "subtle", ] [[package]] -name = "aho-corasick" -version = "1.1.3" +name = "aes-gcm" +version = "0.11.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "e22c0c90bbe8d4f77c3ca9ddabe41a1f8382d6fc1f7cea89459d0f320371f972" dependencies = [ - "memchr", + "aead 0.6.0-rc.10", + "aes 0.9.0", + "cipher 0.5.1", + "ctr 0.10.0", + "ghash 0.6.0", + "subtle", ] [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "aho-corasick" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] [[package]] name = "android_system_properties" @@ -78,9 +98,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -93,49 +113,62 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "argon2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072" +dependencies = [ + "base64ct", + "blake2", + "cpufeatures 0.2.17", + "password-hash", +] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", @@ -144,36 +177,44 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] -name = "backtrace" -version = "0.3.71" +name = "aws-lc-rs" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" +dependencies = [ + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" dependencies = [ - "addr2line", "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "cmake", + "dunce", + "fs_extra", ] [[package]] -name = "base64" -version = "0.22.1" +name = "base16ct" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bcrypt-pbkdf" @@ -183,7 +224,7 @@ checksum = "6aeac2e1fe888769f34f05ac343bbef98b14d1ffb292ab69d4608b3abc86f2a2" dependencies = [ "blowfish", "pbkdf2 0.12.2", - "sha2", + "sha2 0.10.9", ] [[package]] @@ -234,7 +275,7 @@ dependencies = [ "generic-ip", "irrc", "rpsl", - "thiserror", + "thiserror 2.0.18", "tracing", "version-sync", ] @@ -254,10 +295,9 @@ dependencies = [ "paste", "quick-xml", "russh", - "russh-keys", "rustls-pemfile", "rustls-pki-types", - "thiserror", + "thiserror 2.0.18", "tokio", "tokio-rustls", "tracing", @@ -267,17 +307,11 @@ dependencies = [ "version-sync", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" -version = "2.5.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "bitvec" @@ -291,13 +325,31 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "block-buffer" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array", + "generic-array 0.14.7", +] + +[[package]] +name = "block-buffer" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +dependencies = [ + "hybrid-array", ] [[package]] @@ -306,7 +358,16 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ - "generic-array", + "generic-array 0.14.7", +] + +[[package]] +name = "block-padding" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b" +dependencies = [ + "hybrid-array", ] [[package]] @@ -316,14 +377,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" dependencies = [ "byteorder", - "cipher", + "cipher 0.4.4", ] [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "byteorder" @@ -333,9 +394,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cbc" @@ -343,20 +404,41 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher", + "cipher 0.4.4", +] + +[[package]] +name = "cbc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98db6aeaef0eeef2c1e3ce9a27b739218825dae116076352ac3777076aa22225" +dependencies = [ + "cipher 0.5.1", ] [[package]] name = "cc" -version = "1.0.97" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chacha20" @@ -365,22 +447,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher", - "cpufeatures", + "cipher 0.4.4", + "cpufeatures 0.2.17", +] + +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", ] [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-link", ] [[package]] @@ -389,8 +481,19 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", - "inout", + "crypto-common 0.1.7", + "inout 0.1.4", +] + +[[package]] +name = "cipher" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34d8227fe1ba289043aeb13792056ff80fd6de1a9f49137a5f499de8e8c78ea" +dependencies = [ + "block-buffer 0.12.0", + "crypto-common 0.2.1", + "inout 0.2.2", ] [[package]] @@ -401,9 +504,9 @@ checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea" [[package]] name = "clap" -version = "4.5.4" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -411,9 +514,9 @@ dependencies = [ [[package]] name = "clap-verbosity-flag" -version = "2.2.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb9b20c0dd58e4c2e991c8d203bbeb76c11304d1011659686b5b644bc29aa478" +checksum = "9d92b1fab272fe943881b77cc6e920d6543e5b1bfadbd5ed81c7c5a755742394" dependencies = [ "clap", "log", @@ -421,9 +524,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -433,11 +536,11 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn", @@ -445,15 +548,30 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "cmov" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "const-oid" @@ -461,77 +579,154 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpubits" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae" + +[[package]] +name = "cpufeatures" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-bigint" +version = "0.7.0-rc.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96dacf199529fb801ae62a9aafdc01b189e9504c0d1ee1512a4c16bcd8666a93" +dependencies = [ + "cpubits", + "ctutils", + "getrandom 0.4.2", + "hybrid-array", + "num-traits", + "rand_core 0.10.1", + "serdect", + "subtle", + "zeroize", +] [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ - "generic-array", - "rand_core 0.6.4", + "generic-array 0.14.7", "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" +dependencies = [ + "getrandom 0.4.2", + "hybrid-array", + "rand_core 0.10.1", +] + +[[package]] +name = "crypto-primes" +version = "0.7.0-pre.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6081ce8b60c0e533e2bba42771b94eb6149052115f4179744d5779883dc98583" +dependencies = [ + "crypto-bigint", + "libm", + "rand_core 0.10.1", +] + [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", +] + +[[package]] +name = "ctr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17469f8eb9bdbfad10f71f4cfddfd38b01143520c0e717d8796ccb4d44d44e42" +dependencies = [ + "cipher 0.5.1", +] + +[[package]] +name = "ctutils" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" +dependencies = [ + "cmov", + "subtle", ] [[package]] name = "curve25519-dalek" -version = "4.1.2" +version = "5.0.0-pre.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +checksum = "335f1947f241137a14106b6f5acc5918a5ede29c9d71d3f2cb1678d5075d9fc3" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "curve25519-dalek-derive", - "digest", + "digest 0.11.3", "fiat-crypto", - "platforms", "rustc_version", "subtle", "zeroize", @@ -550,25 +745,37 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" + +[[package]] +name = "delegate" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "780eb241654bf097afb00fc5f054a09b687dad862e485fdcf8399bb056565370" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "der" -version = "0.7.9" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b" dependencies = [ - "const-oid", + "const-oid 0.10.2", + "pem-rfc7468 1.0.0", "zeroize", ] [[package]] name = "deranged" -version = "0.3.11" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", ] @@ -579,37 +786,61 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "crypto-common", + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common 0.1.7", "subtle", ] [[package]] -name = "dirs" -version = "5.0.1" +name = "digest" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ - "dirs-sys", + "block-buffer 0.12.0", + "const-oid 0.10.2", + "crypto-common 0.2.1", + "ctutils", ] [[package]] -name = "dirs-sys" -version = "0.4.1" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.17.0-rc.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91bbdd377139884fafcad8dc43a760a3e1e681aa26db910257fa6535b70e1829" +dependencies = [ + "der", + "digest 0.11.3", + "elliptic-curve", + "rfc6979", + "signature", + "spki", + "zeroize", ] [[package]] name = "ed25519" -version = "2.2.3" +version = "3.0.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +checksum = "c6e914c7c52decb085cea910552e24c63ac019e3ab8bf001ff736da9a9d9d890" dependencies = [ "pkcs8", "signature", @@ -617,50 +848,114 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "3.0.0-pre.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "053618a4c3d3bc24f188aa660ae75a46eeab74ef07fb415c61431e5e7cd4749b" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core 0.6.4", + "rand_core 0.10.1", "serde", - "sha2", + "sha2 0.11.0", + "signature", + "subtle", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.14.0-rc.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde7860544606d222fd6bd6d9f9a0773321bf78072a637e1d560a058c0031978" +dependencies = [ + "base16ct", + "crypto-bigint", + "crypto-common 0.2.1", + "digest 0.11.3", + "hkdf", + "hybrid-array", + "once_cell", + "pem-rfc7468 1.0.0", + "pkcs8", + "rand_core 0.10.1", + "rustcrypto-ff", + "rustcrypto-group", + "sec1", "subtle", "zeroize", ] +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] [[package]] name = "fiat-crypto" -version = "0.2.8" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "flate2" -version = "1.0.30" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", ] +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -669,9 +964,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -684,9 +979,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -694,15 +989,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -711,15 +1006,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -728,21 +1023,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -752,7 +1047,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -766,6 +1060,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "generic-array" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab9e9188e97a93276e1fe7b56401b851e2b45a46d045ca658100c1303ada649" +dependencies = [ + "generic-array 0.14.7", + "rustversion", + "typenum", +] + [[package]] name = "generic-ip" version = "0.1.1" @@ -778,53 +1083,76 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", + "js-sys", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", + "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.2.15" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "r-efi 5.3.0", + "wasip2", ] [[package]] -name = "ghash" -version = "0.5.1" +name = "getrandom" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasip2", + "wasip3", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", - "polyval", + "polyval 0.6.2", ] [[package]] -name = "gimli" -version = "0.28.1" +name = "ghash" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "2eecf2d5dc9b66b732b97707a0210906b1d30523eb773193ab777c0c84b3e8d5" +dependencies = [ + "polyval 0.7.1", +] [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] [[package]] -name = "heck" -version = "0.4.1" +name = "hashbrown" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heck" @@ -833,16 +1161,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "hermit-abi" -version = "0.3.9" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.4.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" + +[[package]] +name = "hkdf" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aaa26c720c68b866f2c96ef5c1264b3e6f473fe5d4ce61cd44bbe913e553018" +dependencies = [ + "hmac 0.13.0", +] [[package]] name = "hmac" @@ -850,19 +1187,41 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", +] + +[[package]] +name = "hmac" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" +dependencies = [ + "digest 0.11.3", +] + +[[package]] +name = "hybrid-array" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" +dependencies = [ + "ctutils", + "subtle", + "typenum", + "zeroize", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -876,41 +1235,193 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "idna" -version = "0.5.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.2.6" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "block-padding 0.3.3", + "generic-array 0.14.7", ] [[package]] name = "inout" -version = "0.1.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7" dependencies = [ - "block-padding", - "generic-array", + "block-padding 0.4.2", + "hybrid-array", +] + +[[package]] +name = "internal-russh-forked-ssh-key" +version = "0.6.18+upstream-0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f8a978272e3cbdf4768f7363eb1c8e1e6ba63c52a3ed05e29e222da4aec7cb" +dependencies = [ + "argon2", + "bcrypt-pbkdf", + "crypto-bigint", + "ecdsa", + "ed25519-dalek", + "hex", + "hmac 0.13.0", + "num-bigint-dig", + "p256", + "p384", + "p521", + "rand_core 0.10.1", + "rsa", + "sec1", + "sha1 0.11.0", + "sha2 0.11.0", + "signature", + "ssh-cipher", + "ssh-encoding", + "subtle", + "zeroize", +] + +[[package]] +name = "internal-russh-num-bigint" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8e22120c32fb4d19ec55fba35015f57095cd95a2e3b732e44457f5915b2ee8" +dependencies = [ + "num-integer", + "num-traits", + "rand 0.10.1", + "rand_core 0.10.1", ] [[package]] name = "iri-string" -version = "0.7.2" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f5f6c2df22c009ac44f6f1499308e7a3ac7ba42cd2378475cc691510e1eef1b" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" dependencies = [ "memchr", "serde", @@ -926,66 +1437,110 @@ dependencies = [ "nom", "rpsl", "strum", - "thiserror", + "thiserror 1.0.69", "tracing", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" dependencies = [ + "cfg-if", + "futures-util", + "once_cell", "wasm-bindgen", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "keccak" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", +] [[package]] -name = "libc" -version = "0.2.154" +name = "kem" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "01737161ba802849cfd486b5bd209d38ba4943494c249a8126005170c7621edd" +dependencies = [ + "crypto-common 0.2.1", + "rand_core 0.10.1", +] [[package]] -name = "libredox" -version = "0.1.3" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "bitflags", - "libc", + "spin", ] +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + [[package]] name = "log" -version = "0.4.21" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -996,9 +1551,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "minimal-lexical" @@ -1008,22 +1563,59 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "ml-kem" +version = "0.3.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8198b5db27ac9773534c371751a59dc18aec8b80aa141e69abfdd1dec2e3f78c" +dependencies = [ + "hybrid-array", + "kem", + "module-lattice", + "rand_core 0.10.1", + "sha3", +] + +[[package]] +name = "module-lattice" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c61b87c9683ab7cb1c6871d261ad5479b6b10ceb52c4352aaca3b5d35a8febe" +dependencies = [ + "ctutils", + "hybrid-array", + "num-traits", +] + +[[package]] +name = "nix" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", ] [[package]] @@ -1038,30 +1630,44 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "overload", - "winapi", + "windows-sys 0.61.2", ] [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", - "rand 0.8.5", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.6", + "serde", + "smallvec", ] [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] name = "num-integer" @@ -1073,38 +1679,36 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.19" +name = "num-iter" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", + "num-integer", + "num-traits", ] [[package]] -name = "num_cpus" -version = "1.16.0" +name = "num-traits" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "hermit-abi", - "libc", + "autocfg", ] [[package]] -name = "object" -version = "0.32.2" +name = "once_cell" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] -name = "once_cell" -version = "1.19.0" +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "opaque-debug" @@ -1113,22 +1717,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] -name = "option-ext" -version = "0.2.0" +name = "p256" +version = "0.14.0-rc.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +checksum = "018bfbb86e05fd70a83e985921241035ee09fcd369c4a2c3680b389a01d2ad28" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primefield", + "primeorder", + "sha2 0.11.0", +] [[package]] -name = "overload" -version = "0.1.1" +name = "p384" +version = "0.14.0-rc.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "8c91df688211f5957dbe2ab599dcbcaade8d6d3cdc15c5b350d350d7d07ce423" +dependencies = [ + "ecdsa", + "elliptic-curve", + "fiat-crypto", + "primefield", + "primeorder", + "sha2 0.11.0", +] + +[[package]] +name = "p521" +version = "0.14.0-rc.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de6cd9451de522549d36cc78a1b45a699a3d55a872e8ea0c8f0318e502d99e2c" +dependencies = [ + "base16ct", + "ecdsa", + "elliptic-curve", + "primefield", + "primeorder", + "sha2 0.11.0", +] + +[[package]] +name = "pageant" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b537f975f6d8dcf48db368d7ec209d583b015713b5df0f5d92d2631e4ff5595" +dependencies = [ + "byteorder", + "bytes", + "delegate", + "futures", + "log", + "rand 0.8.6", + "sha2 0.10.9", + "thiserror 1.0.69", + "tokio", + "windows", + "windows-strings", +] [[package]] name = "password-hash" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", "rand_core 0.6.4", @@ -1143,47 +1795,63 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest", - "hmac", - "password-hash", - "sha2", + "digest 0.10.7", + "hmac 0.12.1", ] [[package]] name = "pbkdf2" -version = "0.12.2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629" +dependencies = [ + "digest 0.11.3", + "hmac 0.13.0", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "pem-rfc7468" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9" dependencies = [ - "digest", + "base64ct", ] [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.7.10" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" dependencies = [ "memchr", - "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" dependencies = [ "pest", "pest_generator", @@ -1191,9 +1859,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" dependencies = [ "pest", "pest_meta", @@ -1204,42 +1872,58 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" dependencies = [ - "once_cell", "pest", - "sha2", + "sha2 0.10.9", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] -name = "pin-utils" -version = "0.1.0" +name = "pkcs1" +version = "0.8.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" +dependencies = [ + "der", + "spki", +] [[package]] -name = "pkcs8" -version = "0.10.2" +name = "pkcs5" +version = "0.8.0-rc.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +checksum = "c5a777c6e26664bc9504b3ce3f6133f8f20d9071f130a4f9fcbd3186959d8dd6" dependencies = [ + "aes 0.9.0", + "aes-gcm 0.11.0-rc.3", + "cbc 0.2.0", "der", + "pbkdf2 0.13.0", + "rand_core 0.10.1", + "scrypt", + "sha2 0.11.0", "spki", ] [[package]] -name = "platforms" -version = "3.4.0" +name = "pkcs8" +version = "0.11.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" +checksum = "12922b6296c06eb741b02d7b5161e3aaa22864af38dfa025a1a3ba3f68c84577" +dependencies = [ + "der", + "pkcs5", + "rand_core 0.10.1", + "spki", +] [[package]] name = "poly1305" @@ -1247,9 +1931,9 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cpufeatures", + "cpufeatures 0.2.17", "opaque-debug", - "universal-hash", + "universal-hash 0.5.1", ] [[package]] @@ -1259,9 +1943,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "opaque-debug", - "universal-hash", + "universal-hash 0.5.1", +] + +[[package]] +name = "polyval" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfc63250416fea14f5749b90725916a6c903f599d51cb635aa7a52bfd03eede" +dependencies = [ + "cpubits", + "cpufeatures 0.3.0", + "universal-hash 0.6.1", +] + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", ] [[package]] @@ -1272,15 +1976,51 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "primefield" +version = "0.14.0-rc.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93401c13cc7ff24684571cfca9d3cf9ebabfaf3d4b7b9963ade41ec54da196b5" +dependencies = [ + "crypto-bigint", + "crypto-common 0.2.1", + "rand_core 0.10.1", + "rustcrypto-ff", + "subtle", + "zeroize", +] + +[[package]] +name = "primeorder" +version = "0.14.0-rc.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c5c8a39bcd764bfedf456e8d55e115fe86dda3e0f555371849f2a41cbc9706" +dependencies = [ + "elliptic-curve", +] [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -1298,22 +2038,34 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "2474bd2e5029e7ccb6abb2ba48cf2383a333851dedf495901544281590c7da7f" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "radium" version = "0.7.0" @@ -1322,36 +2074,24 @@ checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", - "rand_chacha 0.3.1", + "rand_chacha", "rand_core 0.6.4", ] [[package]] -name = "rand_chacha" -version = "0.2.2" +name = "rand" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "chacha20 0.10.0", + "getrandom 0.4.2", + "rand_core 0.10.1", ] [[package]] @@ -1364,100 +2104,71 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom 0.2.17", ] [[package]] -name = "redox_users" -version = "0.4.5" +name = "rand_core" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror", -] +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] name = "regex" -version = "1.10.4" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] -name = "regex-syntax" -version = "0.8.3" +name = "rfc6979" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "5236ce872cac07e0fb3969b0cbf468c7d2f37d432f1b627dcb7b8d34563fb0c3" +dependencies = [ + "hmac 0.13.0", + "subtle", +] [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.17", "libc", - "spin", - "untrusted", + "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -1480,115 +2191,175 @@ dependencies = [ "pest", "pest_derive", "strum", - "thiserror", + "thiserror 1.0.69", "time", "tracing", ] +[[package]] +name = "rsa" +version = "0.10.0-rc.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb9fd8c1edd9e6a2693623baf0fe77ff05ce022a5d7746900ffc38a15c233de" +dependencies = [ + "const-oid 0.10.2", + "crypto-bigint", + "crypto-primes", + "digest 0.11.3", + "pkcs1", + "pkcs8", + "rand_core 0.10.1", + "sha2 0.11.0", + "signature", + "spki", + "zeroize", +] + [[package]] name = "russh" -version = "0.39.0" +version = "0.60.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7878311587d0353a854d5be954fbe68bdf6e77873933b484d1e45db12bb2f8cf" +checksum = "324b92f459d3e42da294e14e8eb150d2215fcfb7c966838bc1127cd68bc05a0d" dependencies = [ - "aes", - "aes-gcm", - "async-trait", + "aead 0.6.0-rc.10", + "aes 0.8.4", + "aes 0.9.0", + "aes-gcm 0.11.0-rc.3", + "aws-lc-rs", "bitflags", + "block-padding 0.3.3", "byteorder", - "chacha20", - "ctr", + "bytes", + "cbc 0.1.2", + "cbc 0.2.0", + "cipher 0.5.1", + "crypto-bigint", + "ctr 0.10.0", + "ctr 0.9.2", "curve25519-dalek", - "digest", + "data-encoding", + "delegate", + "der", + "digest 0.10.7", + "ecdsa", + "ed25519-dalek", + "elliptic-curve", + "enum_dispatch", "flate2", "futures", - "generic-array", + "generic-array 1.4.1", + "getrandom 0.2.17", + "ghash 0.6.0", "hex-literal", - "hmac", + "hkdf", + "hmac 0.12.1", + "hmac 0.13.0", + "inout 0.1.4", + "internal-russh-forked-ssh-key", + "internal-russh-num-bigint", + "keccak", "log", + "md5", + "ml-kem", + "module-lattice", "num-bigint", - "once_cell", - "poly1305", - "rand 0.8.5", + "p256", + "p384", + "p521", + "pageant", + "pbkdf2 0.12.2", + "pbkdf2 0.13.0", + "pkcs1", + "pkcs5", + "pkcs8", + "polyval 0.7.1", + "rand 0.10.1", + "rand_core 0.10.1", + "rsa", "russh-cryptovec", - "russh-keys", - "sha1", - "sha2", + "russh-util", + "salsa20", + "scrypt", + "sec1", + "sha1 0.10.6", + "sha1 0.11.0", + "sha2 0.10.9", + "sha2 0.11.0", + "sha3", + "signature", + "spki", + "ssh-encoding", "subtle", - "thiserror", + "thiserror 2.0.18", "tokio", - "tokio-util", + "typenum", + "universal-hash 0.6.1", + "zeroize", ] [[package]] name = "russh-cryptovec" -version = "0.7.2" +version = "0.60.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b077b6dd8d8c085dac62f7fcc5a83df60c7f7a22d49bfba994f2f4dbf60bc74" +checksum = "37cb4d0360bdd8935392a306d8b5edb539cc455b30e8bf13dd213a0cf7879b40" dependencies = [ - "libc", - "winapi", + "log", + "nix", + "ssh-encoding", + "windows-sys 0.61.2", ] [[package]] -name = "russh-keys" -version = "0.38.0" +name = "russh-util" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557ab9190022dff78116ebed5e391abbd3f424b06cd643dfe262346ab91ed8c9" +checksum = "668424a5dde0bcb45b55ba7de8476b93831b4aa2fa6947e145f3b053e22c60b6" dependencies = [ - "aes", - "async-trait", - "bcrypt-pbkdf", - "bit-vec", - "block-padding", - "byteorder", - "cbc", - "ctr", - "data-encoding", - "dirs", - "ed25519-dalek", - "futures", - "hmac", - "inout", - "log", - "md5", - "num-bigint", - "num-integer", - "pbkdf2 0.11.0", - "rand 0.7.3", - "rand_core 0.6.4", - "russh-cryptovec", - "serde", - "sha2", - "thiserror", + "chrono", "tokio", - "tokio-stream", - "yasna", + "wasm-bindgen", + "wasm-bindgen-futures", ] [[package]] -name = "rustc-demangle" -version = "0.1.24" +name = "rustc_version" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] [[package]] -name = "rustc_version" -version = "0.4.0" +name = "rustcrypto-ff" +version = "0.14.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "fd2a8adb347447693cd2ba0d218c4b66c62da9b0a5672b17b981e4291ec65ff6" dependencies = [ - "semver", + "rand_core 0.10.1", + "subtle", +] + +[[package]] +name = "rustcrypto-group" +version = "0.14.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "369f9b61aa45933c062c9f6b5c3c50ab710687eca83dd3802653b140b43f85ed" +dependencies = [ + "rand_core 0.10.1", + "rustcrypto-ff", + "subtle", ] [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ + "aws-lc-rs", "log", - "ring", + "once_cell", "rustls-pki-types", "rustls-webpki", "subtle", @@ -1597,69 +2368,141 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" -version = "0.102.3" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.16" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "salsa20" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f874456e72520ff1375a06c588eaf074b0f01f9e9e1aada45bd9b7954a6e42c" +dependencies = [ + "cfg-if", + "cipher 0.5.1", +] + +[[package]] +name = "scrypt" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87af57419b594aa23fa95f09f0e06d80d84ba01c26148c43844cad6ff4485f0" +dependencies = [ + "cfg-if", + "pbkdf2 0.13.0", + "salsa20", + "sha2 0.11.0", +] + +[[package]] +name = "sec1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" +checksum = "d56d437c2f19203ce5f7122e507831de96f3d2d4d3be5af44a0b0a09d8a80e4d" +dependencies = [ + "base16ct", + "ctutils", + "der", + "hybrid-array", + "subtle", + "zeroize", +] [[package]] name = "semver" -version = "1.0.23" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.201" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serdect" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "66cf8fedced2fcf12406bcb34223dffb92eaf34908ede12fed414c82b7f00b3e" dependencies = [ + "base16ct", "serde", ] @@ -1670,19 +2513,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", ] [[package]] name = "sha2" -version = "0.10.8" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + +[[package]] +name = "sha3" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be176f1a57ce4e3d31c1a166222d9768de5954f811601fb7ca06fc8203905ce1" +dependencies = [ + "digest 0.11.3", + "keccak", ] [[package]] @@ -1694,47 +2569,58 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] [[package]] name = "signature" -version = "2.2.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +checksum = "28d567dcbaf0049cb8ac2608a76cd95ff9e4412e1899d389ee400918ca7537f5" dependencies = [ - "rand_core 0.6.4", + "digest 0.11.3", + "rand_core 0.10.1", ] +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + [[package]] name = "slab" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.5.7" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1745,14 +2631,49 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" -version = "0.7.3" +version = "0.8.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +checksum = "8baeff88f34ed0691978ec34440140e1572b68c7dd4a495fd14a3dc1944daa80" dependencies = [ "base64ct", "der", ] +[[package]] +name = "ssh-cipher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caac132742f0d33c3af65bfcde7f6aa8f62f0e991d80db99149eb9d44708784f" +dependencies = [ + "aes 0.8.4", + "aes-gcm 0.10.3", + "cbc 0.1.2", + "chacha20 0.9.1", + "cipher 0.4.4", + "ctr 0.9.2", + "poly1305", + "ssh-encoding", + "subtle", +] + +[[package]] +name = "ssh-encoding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb9242b9ef4108a78e8cd1a2c98e193ef372437f8c22be363075233321dd4a15" +dependencies = [ + "base64ct", + "bytes", + "pem-rfc7468 0.7.0", + "sha2 0.10.9", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + [[package]] name = "strsim" version = "0.11.1" @@ -1761,20 +2682,20 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", @@ -1783,21 +2704,38 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "symlink" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" [[package]] name = "syn" -version = "2.0.61" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tap" version = "1.0.1" @@ -1806,18 +2744,38 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -1826,83 +2784,75 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] name = "time" -version = "0.3.36" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tinystr" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.37.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ - "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -1910,37 +2860,12 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.11" +name = "tokio-rustls" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", + "rustls", "tokio", ] @@ -1958,9 +2883,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] @@ -1980,9 +2905,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -1992,21 +2917,22 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" dependencies = [ "crossbeam-channel", - "thiserror", + "symlink", + "thiserror 2.0.18", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -2015,9 +2941,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -2036,14 +2962,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -2054,9 +2980,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "ubyte" @@ -2066,50 +2992,54 @@ checksum = "f720def6ce1ee2fc44d40ac9ed6d3a59c361c80a75a7aa8e75bb9baed31cf2ea" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicase" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] -name = "unicode-bidi" -version = "0.3.15" +name = "unicode-ident" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] -name = "unicode-ident" -version = "1.0.12" +name = "unicode-xid" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] -name = "unicode-normalization" -version = "0.1.23" +name = "universal-hash" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "tinyvec", + "crypto-common 0.1.7", + "subtle", ] [[package]] name = "universal-hash" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96" dependencies = [ - "crypto-common", - "subtle", + "crypto-common 0.2.1", + "ctutils", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -2118,36 +3048,45 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.8.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ - "getrandom 0.2.15", - "rand 0.8.5", + "getrandom 0.4.2", + "js-sys", + "rand 0.10.1", + "wasm-bindgen", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "version-sync" @@ -2166,52 +3105,62 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +dependencies = [ + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", +] [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" +name = "wasm-bindgen-futures" +version = "0.4.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "js-sys", + "wasm-bindgen", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2219,61 +3168,159 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" +dependencies = [ + "unicode-ident", +] [[package]] -name = "winapi" -version = "0.3.9" +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-collections" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-targets 0.52.5", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-targets 0.48.5", + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", ] [[package]] @@ -2282,139 +3329,200 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-link", ] [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" +name = "windows-threading" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" +name = "windows_i686_gnu" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_gnu" -version = "0.48.5" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] -name = "windows_i686_gnu" -version = "0.52.5" +name = "windows_i686_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" +name = "windows_x86_64_gnu" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] -name = "windows_i686_msvc" -version = "0.48.5" +name = "windows_x86_64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] -name = "windows_i686_msvc" -version = "0.52.5" +name = "windows_x86_64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] [[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" +name = "wit-bindgen" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] [[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" +name = "wit-bindgen" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" +name = "wit-bindgen-core" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +name = "wit-bindgen-rust" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" +name = "wit-bindgen-rust-macro" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] [[package]] -name = "winnow" -version = "0.5.40" +name = "wit-component" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ - "memchr", + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", ] +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + [[package]] name = "wyz" version = "0.5.1" @@ -2425,17 +3533,110 @@ dependencies = [ ] [[package]] -name = "yasna" -version = "0.5.2" +name = "yoke" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ - "bit-vec", - "num-bigint", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index 3dc5706..7cffcc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [workspace.package] version = "0.1.0" edition = "2021" -rust-version = "1.87" +rust-version = "1.91" authors = ["Ben Maddison "] description = "A toolset for working with IRR data" license = "MIT" @@ -22,8 +22,8 @@ bgpfu-netconf = { path = "./netconf", version = "0.1.0", default-features = fals anyhow = "^1.0" async-trait = "^0.1" bytes = "^1.0" -clap = {version = "^4.0", features = ["derive"]} -clap-verbosity-flag = "^2.0" +clap = { version = "^4.0", features = ["derive"] } +clap-verbosity-flag = "^3.0" chrono = "^0.4" futures = { version = "^0.3.30", default-features = false } generic-ip = "^0.1.1" @@ -31,16 +31,15 @@ iri-string = "^0.7" irrc = "^0.1" memchr = "^2.0" paste = "^1.0" -quick-xml = "^0.31" +quick-xml = "^0.40" rolling-file = "^0.2.0" rpsl = "^0.1" -russh = "^0.39" -russh-keys = "^0.38" +russh = "^0.60" rustls-pemfile = "^2.0" rustls-pki-types = "^1.0" -thiserror = "^1.0" +thiserror = "^2.0" tokio = { version = "^1.0", default-features = false } -tokio-rustls = "^0.25" +tokio-rustls = "^0.26" tracing = { version = "^0.1", features = ["log"] } tracing-appender = "^0.2.3" tracing-log = "^0.2" diff --git a/deny.toml b/deny.toml index 5b32a8e..3571a80 100644 --- a/deny.toml +++ b/deny.toml @@ -1,18 +1,18 @@ all-features = true [licenses] -copyleft = "deny" -allow = [ - "Apache-2.0", - "BSD-3-Clause", - "ISC", - "MIT", -] +allow = ["Apache-2.0", "BSD-3-Clause", "ISC", "MIT"] confidence-threshold = 0.8 exceptions = [ - { name = "ring", allow = ["OpenSSL"] }, - { name = "option-ext", allow = ["MPL-2.0"] }, - { name = "unicode-ident", allow = ["Unicode-DFS-2016"] }, + { name = "ring", allow = [ + "OpenSSL", + ] }, + { name = "option-ext", allow = [ + "MPL-2.0", + ] }, + { name = "unicode-ident", allow = [ + "Unicode-3.0", + ] }, ] [[licenses.clarify]] diff --git a/flake.lock b/flake.lock index c55e361..8aba096 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1714183630, - "narHash": "sha256-1BVft7ggSN2XXFeXQjazU3jN9wVECd9qp2mZx/8GDMk=", + "lastModified": 1777660670, + "narHash": "sha256-C8hgon8MOPJWA67TH1PHEziDwpsSdJN2CpFdKTwb6ZI=", "owner": "rustsec", "repo": "advisory-db", - "rev": "35e7459a331d3e0c585e56dabd03006b9b354088", + "rev": "20377f44edabca7c4a765ccdcd05935331b6191f", "type": "github" }, "original": { @@ -17,17 +17,12 @@ } }, "crane": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, "locked": { - "lastModified": 1714864355, - "narHash": "sha256-uXNW6bapWFfkYIkK1EagydSrFMqycOYEDSq75GmUpjk=", + "lastModified": 1777830388, + "narHash": "sha256-2uoQAqUk2H0ijQtGiWAyNeQYGYc6yfAcRRLlJAz4Gp8=", "owner": "ipetkov", "repo": "crane", - "rev": "442a7a6152f49b907e73206dc8e1f46a61e8e873", + "rev": "d459c1350e96ce1a7e3859c513ef5e9869d67d6f", "type": "github" }, "original": { @@ -44,11 +39,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1715063087, - "narHash": "sha256-cktPkcCmJ2sR0V/FaWEuCWmKuGPbwoMltih/EfF0mXg=", + "lastModified": 1777796307, + "narHash": "sha256-L7xLjorTwVf2aLu5b0ZZY2D0RFXwD/a/a/fFFDikB2w=", "owner": "nix-community", "repo": "fenix", - "rev": "f8f16c1f2c83bea4e51e6522d988ec8bfcc8420e", + "rev": "0f9881f2344c0b1c100bd9e774555759b7da6fd5", "type": "github" }, "original": { @@ -62,11 +57,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -95,19 +90,19 @@ "msrv-manifest": { "flake": false, "locked": { - "narHash": "sha256-BwfxWd/E8gpnXoKsucFXhMbevMlVgw3l0becLkIcWCU=", + "narHash": "sha256-IAyz2bMMaE2h2h4TquVZ6dZepCwjUyy3/vRgX6xXbiY=", "type": "file", - "url": "https://static.rust-lang.org/dist/channel-rust-1.87.toml" + "url": "https://static.rust-lang.org/dist/channel-rust-1.91.toml" }, "original": { "type": "file", - "url": "https://static.rust-lang.org/dist/channel-rust-1.87.toml" + "url": "https://static.rust-lang.org/dist/channel-rust-1.91.toml" } }, "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-pq51dW3BxtIAeqGQNJuNLSc8AB3ubEghxYuY9rcud7M=", + "narHash": "sha256-fag2Phz5+66uiq2HTr3P8C2IiGdak9BRv0j8LfaTiyA=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, @@ -118,16 +113,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1715106579, - "narHash": "sha256-gZMgKEGiK6YrwGBiccZ1gemiUwjsZ1Zv49KYOgmX2fY=", + "lastModified": 1777673416, + "narHash": "sha256-5c2POKPOjU40Kh0MirOdScBLG0bu9TAuPYAtPRNZMBs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8be0d8a1ed4f96d99b09aa616e2afd47acc3da89", + "rev": "26ef669cffa904b6f6832ab57b77892a37c1a671", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } @@ -148,11 +143,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1714936835, - "narHash": "sha256-M+PpgfRMBfHo8Jb2ou/s3maAZbps0XnuHXQU9Hv9vL0=", + "lastModified": 1777768857, + "narHash": "sha256-zfekJcaVctfAps1KDHwZpwkvAQn7GObRHh3Gl3xocGI=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "c4618fe14d39992fbbb85c2d6cad028a232c13d2", + "rev": "1102c0b633599564919e36076d4362d7e68dbddc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b7a318e..4f61461 100644 --- a/flake.nix +++ b/flake.nix @@ -2,16 +2,13 @@ description = "Packages and tooling for bgpfu"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; flake-utils.url = "github:numtide/flake-utils"; fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - crane = { - url = "github:ipetkov/crane"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + crane.url = "github:ipetkov/crane"; jetez-src = { url = "github:juniper/jetez/v1.0.7"; flake = false; @@ -25,7 +22,7 @@ flake = false; }; msrv-manifest = { - url = "https://static.rust-lang.org/dist/channel-rust-1.87.toml"; + url = "https://static.rust-lang.org/dist/channel-rust-1.91.toml"; flake = false; }; advisory-db = { @@ -35,6 +32,32 @@ }; outputs = { self, ... } @ inputs: + { + lib.collectChecks = checks: + let + inherit (inputs.nixpkgs) lib; + nil = { path = []; items = []; }; + pathToName = path: lib.concatStringsSep "-" path; + collect = acc: checks: + lib.foldl + ({ path, items }: { name, value }: + let + path' = path ++ [ name ]; + in + if (value ? checks) + then collect + { path = path'; inherit items; } + value.checks + else { + path = path'; + items = items ++ [ + (lib.nameValuePair (pathToName path') value) + ]; + }) + acc + (lib.attrsToList checks); + in collect nil checks; + } // inputs.flake-utils.lib.eachDefaultSystem (system: let diff --git a/junos-agent/Cargo.toml b/junos-agent/Cargo.toml index 273278f..77acd1a 100644 --- a/junos-agent/Cargo.toml +++ b/junos-agent/Cargo.toml @@ -33,7 +33,13 @@ tracing-log.workspace = true ubyte.workspace = true tracing-subscriber = { workspace = true, features = ["env-filter"] } bgpfu-netconf = { workspace = true, features = ["tls", "junos"] } -tokio = { workspace = true, features = ["fs", "signal", "time", "rt-multi-thread", "macros"] } +tokio = { workspace = true, features = [ + "fs", + "signal", + "time", + "rt-multi-thread", + "macros", +] } [dev-dependencies] version-sync.workspace = true diff --git a/junos-agent/src/policies/fetch.rs b/junos-agent/src/policies/fetch.rs index 7fcd59c..8114ed4 100644 --- a/junos-agent/src/policies/fetch.rs +++ b/junos-agent/src/policies/fetch.rs @@ -14,7 +14,7 @@ use netconf::message::{rpc::operation::Datastore, ReadError, ReadXml}; use quick_xml::{ events::{BytesStart, Event}, name::{Namespace, ResolveResult}, - NsReader, + NsReader, XmlVersion, }; use rpsl::expr::MpFilterExpr; @@ -145,16 +145,17 @@ impl ReadXml for Maybe { // malformed mp-filter expr. for attr in start.attributes().with_checks(false) { let attr = attr.map_err(|err| ReadError::Other(err.into()))?; - match reader.resolve_attribute(attr.key) { + match reader.resolver().resolve_attribute(attr.key) { (ResolveResult::Bound(JCMD), name) - if name.as_ref() == b"active" && attr.unescape_value()? == "false" => + if name.as_ref() == b"active" + && attr.normalized_value(XmlVersion::Implicit1_0)? == "false" => { tracing::debug!("skipping inactive policy-statement"); _ = reader.read_to_end(end.name())?; return Ok(Self(None)); } (ResolveResult::Bound(JCMD), name) if name.as_ref() == b"comment" => { - let attr_value = attr.unescape_value()?; + let attr_value = attr.normalized_value(XmlVersion::Implicit1_0)?; let raw_expr = attr_value .trim_matches(['/', '*'].as_slice()) .trim() @@ -184,7 +185,12 @@ impl ReadXml for Maybe { (ResolveResult::Bound(XNM), Event::Start(tag)) if tag.local_name().as_ref() == b"name" && name.is_none() => { - name = Some(reader.read_text(tag.to_end().name()).map(Name::new)?); + name = Some( + reader + .read_text(tag.to_end().name())? + .xml10_content() + .map(Name::new)?, + ); } (ResolveResult::Bound(XNM), Event::Start(tag)) if tag.local_name().as_ref() == b"then" && !reject_policy => @@ -243,7 +249,12 @@ impl ReadXml for Maybe { if tag.local_name().as_ref() == b"name" && name.is_none() => { tracing::debug!(?tag); - name = Some(reader.read_text(tag.to_end().name()).map(Name::new)?); + name = Some( + reader + .read_text(tag.to_end().name())? + .xml10_content() + .map(Name::new)?, + ); tracing::debug!(?name); } (ResolveResult::Bound(XNM), Event::Start(tag)) @@ -343,7 +354,7 @@ impl<'i> BorrowedReadXml<'i> for Term<'i> { if tag.local_name().as_ref() == b"name" && name.is_none() => { tracing::trace!(?tag); - name = Some(reader.read_text(tag.to_end().name())?); + name = Some(reader.read_text(tag.to_end().name())?.xml10_content()?); } (ResolveResult::Bound(XNM), Event::Start(tag)) if tag.local_name().as_ref() == b"from" && from.is_none() => @@ -430,7 +441,7 @@ impl TermFrom<'_> { } (afi, family) => { return Err(ReadError::Other( - anyhow!("can't parse '{family}' term into {afi} prefix-ranges",).into(), + anyhow!("can't parse '{family}' term into {afi} prefix-ranges").into(), )) } } @@ -477,7 +488,7 @@ impl<'i> BorrowedReadXml<'i> for TermFrom<'i> { if tag.local_name().as_ref() == b"family" && family.is_none() => { tracing::trace!(?tag); - family = Some(reader.read_text(tag.to_end().name())?); + family = Some(reader.read_text(tag.to_end().name())?.xml10_content()?); } (ResolveResult::Bound(XNM), Event::Start(tag)) if tag.local_name().as_ref() == b"route-filter" => @@ -523,14 +534,14 @@ impl<'i> BorrowedReadXml<'i> for RouteFilter<'i> { if tag.local_name().as_ref() == b"address" && address.is_none() => { tracing::trace!(?tag); - address = Some(reader.read_text(tag.to_end().name())?); + address = Some(reader.read_text(tag.to_end().name())?.xml10_content()?); } (ResolveResult::Bound(XNM), Event::Start(tag)) if tag.local_name().as_ref() == b"choice-ident" && prefix_length_range.is_none() => { tracing::trace!(?tag); - let ident = reader.read_text(tag.to_end().name())?; + let ident = reader.read_text(tag.to_end().name())?.xml10_content()?; if ident.as_ref() != "prefix-length-range" { return Err(ReadError::Other( anyhow!("unexpected 'choice-ident' value '{ident}'").into(), @@ -542,7 +553,8 @@ impl<'i> BorrowedReadXml<'i> for RouteFilter<'i> { if tag.local_name().as_ref() == b"choice-value" => { tracing::trace!(?tag); - prefix_length_range = Some(reader.read_text(tag.to_end().name())?); + prefix_length_range = + Some(reader.read_text(tag.to_end().name())?.xml10_content()?); break; } (_, Event::Comment(_)) => (), @@ -644,7 +656,8 @@ mod tests { .collect(), }; let mut reader = NsReader::from_str(input); - let (_, Event::Start(start)) = reader.trim_text(true).read_resolved_event().unwrap() else { + reader.config_mut().trim_text(true); + let (_, Event::Start(start)) = reader.read_resolved_event().unwrap() else { panic!("expected valid start tag"); }; let read = Policies::read_xml(&mut reader, &start).unwrap(); @@ -659,7 +672,7 @@ mod tests { fn $name() { let doc = format!("{}", $input); let mut reader = NsReader::from_str(&doc); - _ = reader.trim_text(true); + reader.config_mut().trim_text(true); let mut result = None; loop { match reader.read_resolved_event().unwrap() { @@ -693,18 +706,18 @@ mod tests { " => Policies::default() } - #[should_panic(expected = r#"Xml(EndEventMismatch { expected: "configuration", found: "noitarugifnoc" })"#)] + #[should_panic(expected = r#"Xml(IllFormed(MismatchedEndTag { expected: "configuration", found: "noitarugifnoc" }))"#)] mismatched_root { r#""# => Policies::default() } - #[should_panic(expected = r#"Xml(EndEventMismatch { expected: "configuration", found: "root" })"#)] + #[should_panic(expected = r#"Xml(IllFormed(MismatchedEndTag { expected: "configuration", found: "root" }))"#)] premature_eof_in_configuration { r#" "# => Policies::default() } - #[should_panic(expected = r#"Xml(EndEventMismatch { expected: "policy-options", found: "root" })"#)] + #[should_panic(expected = r#"Xml(IllFormed(MismatchedEndTag { expected: "policy-options", found: "root" }))"#)] premature_eof_in_policy_options { r#" diff --git a/junos-agent/src/policies/load.rs b/junos-agent/src/policies/load.rs index 339c39c..d2c200f 100644 --- a/junos-agent/src/policies/load.rs +++ b/junos-agent/src/policies/load.rs @@ -1,8 +1,11 @@ -use std::{fmt::Debug, io::Write}; +use std::{ + fmt::Debug, + io::{self, Write}, +}; use chrono::{DateTime, Utc}; use ip::{Afi, PrefixRange}; -use netconf::message::{WriteError, WriteXml}; +use netconf::message::WriteXml; use quick_xml::{events::BytesText, ElementWriter, Writer}; use super::{Differences, Update, Updates}; @@ -52,7 +55,7 @@ impl Update<'_> { } impl WriteXml for Update<'_> { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element("configuration") .write_inner_content(|writer| { @@ -65,7 +68,7 @@ impl WriteXml for Update<'_> { .create_element("name") .write_text_content(self.name())?; match self { - Self::Delete { .. } => Ok::<_, WriteError>(()), + Self::Delete { .. } => Ok(()), Self::Update { ipv4, ipv6, .. } => { ipv4.write_xml(writer)?; ipv6.write_xml(writer)?; @@ -90,7 +93,7 @@ impl WriteXml for Update<'_> { } impl WriteXml for Differences<'_, A> { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let elem = { let elem = writer.create_element("term"); match (self.old, self.new.is_empty()) { @@ -122,7 +125,7 @@ impl WriteXml for Differences<'_, A> { })?; } } - Ok::<_, WriteError>(()) + Ok(()) })?; _ = writer .create_element("then") @@ -130,7 +133,7 @@ impl WriteXml for Differences<'_, A> { writer.create_element("accept").write_empty().map(|_| ()) })?; } - Ok::<_, WriteError>(()) + Ok(()) })?; Ok(()) } @@ -149,7 +152,7 @@ fn write_route_filter( writer: &mut Writer, range: &PrefixRange, delete: bool, -) -> Result<(), WriteError> { +) -> Result<(), io::Error> { let mut elem = writer.create_element("route-filter"); if delete { elem = elem.with_attribute(("delete", "delete")); @@ -165,7 +168,7 @@ fn write_route_filter( range.lower(), range.upper() )))?; - Ok::<_, WriteError>(()) + Ok(()) }) .map(|_| ()) } diff --git a/junos-agent/src/task.rs b/junos-agent/src/task.rs index 9149eba..d1c375c 100644 --- a/junos-agent/src/task.rs +++ b/junos-agent/src/task.rs @@ -131,7 +131,7 @@ pub(crate) struct Loop { period: Duration, } -const MIN_BACKOFF: Duration = Duration::from_secs(60); +const MIN_BACKOFF: Duration = Duration::from_mins(1); impl Loop { #[tracing::instrument(skip(self), level = "trace")] diff --git a/netconf/Cargo.toml b/netconf/Cargo.toml index 93235c4..8fab698 100644 --- a/netconf/Cargo.toml +++ b/netconf/Cargo.toml @@ -16,20 +16,16 @@ name = "netconf" [features] default = ["ssh", "tls"] -ssh = ["dep:russh", "dep:russh-keys"] +ssh = ["dep:russh"] tls = [ - "dep:tokio-rustls", - "dep:rustls-pki-types", - "tokio/sync", - "tokio/io-util", - "tokio/macros", - "tokio/net", -] -junos = [ - "dep:chrono", - "dep:paste", - "tokio/process", + "dep:tokio-rustls", + "dep:rustls-pki-types", + "tokio/sync", + "tokio/io-util", + "tokio/macros", + "tokio/net", ] +junos = ["dep:chrono", "dep:paste", "tokio/process"] [dependencies] async-trait.workspace = true @@ -41,10 +37,9 @@ thiserror.workspace = true tokio.workspace = true tracing.workspace = true uuid.workspace = true -chrono = {workspace = true, optional = true} +chrono = { workspace = true, optional = true } paste = { workspace = true, optional = true } russh = { workspace = true, optional = true } -russh-keys = { workspace = true, optional = true } rustls-pki-types = { workspace = true, optional = true } tokio-rustls = { workspace = true, optional = true } diff --git a/netconf/src/capabilities.rs b/netconf/src/capabilities.rs index b5dfaee..7da2cb8 100644 --- a/netconf/src/capabilities.rs +++ b/netconf/src/capabilities.rs @@ -2,7 +2,7 @@ use std::{ borrow::Cow, collections::{BTreeSet, HashSet}, fmt::Display, - io::Write, + io::{self, Write}, str::FromStr, sync::Arc, }; @@ -15,7 +15,7 @@ use quick_xml::{ }; use crate::{ - message::{xmlns, ReadError, ReadXml, WriteError, WriteXml}, + message::{xmlns, ReadError, ReadXml, WriteXml}, Error, }; @@ -64,7 +64,7 @@ impl ReadXml for Capabilities { { let span = reader.read_text(tag.to_end().name())?; tracing::debug!(?span, "parsing capability"); - _ = inner.insert(span.parse()?); + _ = inner.insert(span.xml10_content()?.parse()?); } (_, Event::End(tag)) if tag == end => break, (ns, event) => { @@ -78,7 +78,7 @@ impl ReadXml for Capabilities { } impl WriteXml for Capabilities { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer .create_element("capabilities") .write_inner_content(|writer| { @@ -218,7 +218,7 @@ impl Capability { } impl WriteXml for Capability { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer .create_element("capability") .write_text_content(BytesText::new(&self.uri()))?; diff --git a/netconf/src/message/error.rs b/netconf/src/message/error.rs index d901e87..7c338da 100644 --- a/netconf/src/message/error.rs +++ b/netconf/src/message/error.rs @@ -5,10 +5,18 @@ use super::rpc; pub enum Read { Xml(#[from] quick_xml::Error), + /// XML attribute parsing failed. + #[error("failed to parse an XML attribute")] + XmlAttribute(#[from] quick_xml::events::attributes::AttrError), + /// UTF-8 decoding failed. #[error("failed to decode utf-8")] DecodeMessage(#[from] std::str::Utf8Error), + /// XML content decoding failed. + #[error("failed to decode XML 1.0 content")] + XmlContentDecoding(#[from] quick_xml::encoding::EncodingError), + /// Failed to parse a [`MessageId`][rpc::MessageId]. #[error("failed to parse message-id")] MessageIdParse(#[source] std::num::ParseIntError), @@ -65,11 +73,11 @@ impl Read { #[derive(Debug, thiserror::Error)] #[error("failed to serialize message content as XML")] pub enum Write { - Xml(#[from] quick_xml::Error), + /// XML serialization failed + #[error("failed to serialize message content")] + Xml(#[from] std::io::Error), /// UTF-8 encoding failed. #[error("failed to utf-8 encode message")] EncodeMessage(#[from] std::string::FromUtf8Error), - - Other(#[source] Box), } diff --git a/netconf/src/message/hello.rs b/netconf/src/message/hello.rs index 08e2a32..912c8d5 100644 --- a/netconf/src/message/hello.rs +++ b/netconf/src/message/hello.rs @@ -1,4 +1,7 @@ -use std::{fmt::Debug, io::Write}; +use std::{ + fmt::Debug, + io::{self, Write}, +}; use quick_xml::{ events::{BytesStart, Event}, @@ -11,7 +14,7 @@ use crate::{ session::SessionId, }; -use super::{xmlns, ClientMsg, ReadError, ReadXml, ServerMsg, WriteError, WriteXml}; +use super::{xmlns, ClientMsg, ReadError, ReadXml, ServerMsg, WriteXml}; #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) struct ServerHello { @@ -53,7 +56,7 @@ impl ReadXml for ServerHello { tracing::debug!(?tag); let span = reader.read_text(tag.to_end().name())?; tracing::debug!(?span, "trying to parse session_id"); - session_id = Some(span.parse()?); + session_id = Some(span.xml10_content()?.parse()?); tracing::debug!(?session_id); } (_, Event::Comment(_)) => (), @@ -106,7 +109,7 @@ impl Default for ClientHello { } impl WriteXml for ClientHello { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer .create_element("hello") .write_inner_content(|writer| self.capabilities.write_xml(writer))?; diff --git a/netconf/src/message/mod.rs b/netconf/src/message/mod.rs index 458d407..4829909 100644 --- a/netconf/src/message/mod.rs +++ b/netconf/src/message/mod.rs @@ -1,4 +1,8 @@ -use std::{fmt::Debug, io::Write, str::from_utf8}; +use std::{ + fmt::Debug, + io::{self, Write}, + str::from_utf8, +}; use async_trait::async_trait; use quick_xml::{ @@ -29,7 +33,7 @@ pub trait ReadXml: Sized { } pub trait WriteXml { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError>; + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error>; } #[async_trait] @@ -64,7 +68,7 @@ pub trait ServerMsg: ReadXml { { tracing::debug!(input = input.as_ref()); let mut reader = NsReader::from_str(input.as_ref()); - _ = reader.trim_text(true); + reader.config_mut().trim_text(true); tracing::debug!("expecting <{}>", Self::TAG_NAME); let mut this = None; loop { diff --git a/netconf/src/message/rpc/error.rs b/netconf/src/message/rpc/error.rs index 3b9e19f..575eeec 100644 --- a/netconf/src/message/rpc/error.rs +++ b/netconf/src/message/rpc/error.rs @@ -65,6 +65,7 @@ pub struct Error { } impl ReadXml for Error { + #[allow(clippy::too_many_lines)] #[tracing::instrument(skip_all, fields(tag = ?start.local_name()), level = "debug")] fn read_xml(reader: &mut NsReader<&[u8]>, start: &BytesStart<'_>) -> Result { let end = start.to_end(); @@ -83,7 +84,13 @@ impl ReadXml for Error { && error_type.is_none() => { tracing::debug!(?tag); - error_type = Some(reader.read_text(tag.to_end().name())?.trim().parse()?); + error_type = Some( + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .trim() + .parse()?, + ); } (ResolveResult::Bound(ns), Event::Start(tag)) if ns == xmlns::BASE @@ -91,7 +98,13 @@ impl ReadXml for Error { && error_tag.is_none() => { tracing::debug!(?tag); - error_tag = Some(reader.read_text(tag.to_end().name())?.trim().parse()?); + error_tag = Some( + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .trim() + .parse()?, + ); } (ResolveResult::Bound(ns), Event::Start(tag)) if ns == xmlns::BASE @@ -99,7 +112,13 @@ impl ReadXml for Error { && severity.is_none() => { tracing::debug!(?tag); - severity = Some(reader.read_text(tag.to_end().name())?.trim().parse()?); + severity = Some( + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .trim() + .parse()?, + ); } (ResolveResult::Bound(ns), Event::Start(tag)) if ns == xmlns::BASE @@ -110,6 +129,7 @@ impl ReadXml for Error { app_tag = Some( reader .read_text(tag.to_end().name())? + .xml10_content()? .trim() .parse() .unwrap_or_else(|_| unreachable!()), @@ -124,6 +144,7 @@ impl ReadXml for Error { path = Some( reader .read_text(tag.to_end().name())? + .xml10_content()? .trim() .parse() .unwrap_or_else(|_| unreachable!()), @@ -138,6 +159,7 @@ impl ReadXml for Error { message = Some( reader .read_text(tag.to_end().name())? + .xml10_content()? .trim() .parse() .unwrap_or_else(|_| unreachable!()), @@ -398,30 +420,48 @@ impl ReadXml for Info { (ResolveResult::Bound(ns), Event::Start(tag)) if ns == xmlns::BASE => { match tag.local_name().as_ref() { b"bad-attribute" => inner.push(InfoElement::BadAttribute( - reader.read_text(tag.to_end().name())?.as_ref().into(), + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .into(), )), b"bad-element" => inner.push(InfoElement::BadElement( - reader.read_text(tag.to_end().name())?.as_ref().into(), + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .into(), )), b"bad-namespace" => inner.push(InfoElement::BadNamespace( - reader.read_text(tag.to_end().name())?.as_ref().into(), + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .into(), )), b"session-id" => inner.push(InfoElement::SessionId( reader .read_text(tag.to_end().name())? - .as_ref() + .xml10_content()? .parse() .map_err(ReadError::SessionIdParse) .map(|session_id| SessionId::new(session_id).ok())?, )), b"ok-element" => inner.push(InfoElement::OkElement( - reader.read_text(tag.to_end().name())?.as_ref().into(), + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .into(), )), b"err-element" => inner.push(InfoElement::ErrElement( - reader.read_text(tag.to_end().name())?.as_ref().into(), + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .into(), )), b"noop-element" => inner.push(InfoElement::NoopElement( - reader.read_text(tag.to_end().name())?.as_ref().into(), + reader + .read_text(tag.to_end().name())? + .xml10_content()? + .into(), )), name => { return Err(ReadError::UnknownErrorInfo(from_utf8(name)?.to_string())) @@ -455,7 +495,7 @@ pub enum InfoElement { #[cfg(test)] mod tests { - use std::io::Write; + use std::io::{self, Write}; use quick_xml::Writer; @@ -464,7 +504,7 @@ mod tests { capabilities::Requirements, message::{ rpc::{operation, EmptyReply, MessageId, Operation, PartialReply, Reply}, - ServerMsg, WriteError, WriteXml, + ServerMsg, WriteXml, }, }; @@ -479,7 +519,7 @@ mod tests { } impl WriteXml for Dummy { - fn write_xml(&self, _: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, _: &mut Writer) -> Result<(), io::Error> { Ok(()) } } diff --git a/netconf/src/message/rpc/mod.rs b/netconf/src/message/rpc/mod.rs index 6664686..e25da69 100644 --- a/netconf/src/message/rpc/mod.rs +++ b/netconf/src/message/rpc/mod.rs @@ -1,12 +1,16 @@ -use std::{fmt::Debug, io::Write, str::from_utf8}; +use std::{ + fmt::Debug, + io::{self, Write}, + str::from_utf8, +}; use quick_xml::{ events::{attributes::Attribute, BytesStart, Event}, name::{Namespace, ResolveResult}, - NsReader, Writer, + NsReader, Writer, XmlVersion, }; -use super::{xmlns, ClientMsg, ReadError, ReadXml, ServerMsg, WriteError, WriteXml, MARKER}; +use super::{xmlns, ClientMsg, ReadError, ReadXml, ServerMsg, WriteXml, MARKER}; pub mod error; pub use self::error::{Error, Errors}; @@ -30,8 +34,7 @@ impl TryFrom> for MessageId { fn try_from(value: Attribute<'_>) -> Result { Ok(Self( value - .unescape_value()? - .as_ref() + .normalized_value(XmlVersion::Implicit1_0)? .parse() .map_err(ReadError::MessageIdParse)?, )) @@ -54,7 +57,7 @@ impl Request { } impl WriteXml for Request { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element("rpc") .with_attribute(("message-id", self.message_id.0.to_string().as_ref())) @@ -90,7 +93,7 @@ impl ServerMsg for PartialReply { S: AsRef + Debug, { let mut reader = NsReader::from_str(input.as_ref()); - _ = reader.trim_text(true); + reader.config_mut().trim_text(true); Self::read_xml(&mut reader, &BytesStart::new("dummy")) } } @@ -293,6 +296,8 @@ impl IntoResult for DataReply { } #[cfg(test)] mod tests { + use std::io; + use quick_xml::events::BytesText; use super::*; @@ -304,7 +309,7 @@ mod tests { } impl WriteXml for Foo { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer .create_element("foo") .write_text_content(BytesText::new(self.foo))?; @@ -395,7 +400,7 @@ mod tests { struct Bar; impl WriteXml for Bar { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer.create_element("bar").write_empty()?; Ok(()) } @@ -429,6 +434,7 @@ mod tests { result = Some( reader .read_text(tag.to_end().name())? + .xml10_content()? .parse::() .map_err(|err| ReadError::Other(err.into()))?, ); diff --git a/netconf/src/message/rpc/operation/cancel_commit.rs b/netconf/src/message/rpc/operation/cancel_commit.rs index ca51765..79d17a4 100644 --- a/netconf/src/message/rpc/operation/cancel_commit.rs +++ b/netconf/src/message/rpc/operation/cancel_commit.rs @@ -1,10 +1,9 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::{events::BytesText, Writer}; use crate::{ capabilities::{Capability, Requirements}, - message::WriteError, session::Context, Error, }; @@ -25,7 +24,7 @@ impl Operation for CancelCommit { } impl WriteXml for CancelCommit { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let elem = writer.create_element("cancel-commit"); if let Some(ref token) = self.persist_id { _ = elem.write_inner_content(|writer| { diff --git a/netconf/src/message/rpc/operation/close_session.rs b/netconf/src/message/rpc/operation/close_session.rs index 4a16646..85818e4 100644 --- a/netconf/src/message/rpc/operation/close_session.rs +++ b/netconf/src/message/rpc/operation/close_session.rs @@ -1,9 +1,9 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::Writer; use super::{EmptyReply, Operation, WriteXml}; -use crate::{capabilities::Requirements, message::WriteError, session::Context, Error}; +use crate::{capabilities::Requirements, session::Context, Error}; #[derive(Debug, Default, Clone, Copy)] pub(crate) struct CloseSession; @@ -16,7 +16,7 @@ impl Operation for CloseSession { } impl WriteXml for CloseSession { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer.create_element(Self::NAME).write_empty()?; Ok(()) } diff --git a/netconf/src/message/rpc/operation/commit.rs b/netconf/src/message/rpc/operation/commit.rs index f3da602..c82c558 100644 --- a/netconf/src/message/rpc/operation/commit.rs +++ b/netconf/src/message/rpc/operation/commit.rs @@ -1,10 +1,12 @@ -use std::{io::Write, time::Duration}; +use std::{ + io::{self, Write}, + time::Duration, +}; use quick_xml::{events::BytesText, Writer}; use crate::{ capabilities::{Capability, Requirements}, - message::WriteError, session::Context, Error, }; @@ -28,7 +30,7 @@ impl Operation for Commit { } impl WriteXml for Commit { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let elem = writer.create_element("commit"); if self.confirmed { elem.write_inner_content(|writer| { @@ -209,7 +211,7 @@ mod tests { message_id: MessageId(101), operation: Commit { confirmed: true, - confirm_timeout: Timeout(Duration::from_secs(60)), + confirm_timeout: Timeout(Duration::from_mins(1)), persist: None, persist_id: None, }, diff --git a/netconf/src/message/rpc/operation/copy_config.rs b/netconf/src/message/rpc/operation/copy_config.rs index 764eb70..bad3c76 100644 --- a/netconf/src/message/rpc/operation/copy_config.rs +++ b/netconf/src/message/rpc/operation/copy_config.rs @@ -1,8 +1,8 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::Writer; -use crate::{capabilities::Requirements, message::WriteError, session::Context, Error}; +use crate::{capabilities::Requirements, session::Context, Error}; use super::{params::Required, Datastore, EmptyReply, Operation, Source, WriteXml}; @@ -21,7 +21,7 @@ impl Operation for CopyConfig { } impl WriteXml for CopyConfig { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { @@ -89,7 +89,7 @@ enum Target { } impl WriteXml for Target { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { match self { Self::Datastore(datastore) => datastore.write_xml(writer), } diff --git a/netconf/src/message/rpc/operation/delete_config.rs b/netconf/src/message/rpc/operation/delete_config.rs index e9a5c5c..770a0dc 100644 --- a/netconf/src/message/rpc/operation/delete_config.rs +++ b/netconf/src/message/rpc/operation/delete_config.rs @@ -1,8 +1,8 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::Writer; -use crate::{capabilities::Requirements, message::WriteError, session::Context, Error}; +use crate::{capabilities::Requirements, session::Context, Error}; use super::{params::Required, Datastore, EmptyReply, Operation, Url, WriteXml}; @@ -20,7 +20,7 @@ impl Operation for DeleteConfig { } impl WriteXml for DeleteConfig { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { @@ -81,7 +81,7 @@ enum Target { } impl WriteXml for Target { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { match self { Self::Datastore(datastore) => datastore.write_xml(writer), Self::Url(url) => url.write_xml(writer), diff --git a/netconf/src/message/rpc/operation/discard_changes.rs b/netconf/src/message/rpc/operation/discard_changes.rs index e320289..08fff1f 100644 --- a/netconf/src/message/rpc/operation/discard_changes.rs +++ b/netconf/src/message/rpc/operation/discard_changes.rs @@ -1,10 +1,9 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::Writer; use crate::{ capabilities::{Capability, Requirements}, - message::WriteError, session::Context, Error, }; @@ -26,7 +25,7 @@ impl Operation for DiscardChanges { } impl WriteXml for DiscardChanges { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer.create_element("discard-changes").write_empty()?; Ok(()) } diff --git a/netconf/src/message/rpc/operation/edit_config.rs b/netconf/src/message/rpc/operation/edit_config.rs index 5e9642e..4646f6e 100644 --- a/netconf/src/message/rpc/operation/edit_config.rs +++ b/netconf/src/message/rpc/operation/edit_config.rs @@ -1,10 +1,12 @@ -use std::{fmt::Debug, io::Write}; +use std::{ + fmt::Debug, + io::{self, Write}, +}; use quick_xml::{events::BytesText, Writer}; use crate::{ capabilities::{Capability, Requirements}, - message::WriteError, session::Context, Error, }; @@ -34,7 +36,7 @@ impl WriteXml for EditConfig where D: WriteXml + Debug + Send + Sync, { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { @@ -153,7 +155,7 @@ impl WriteXml for Source where D: WriteXml, { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { match self { Self::Config(config) => writer .create_element("config") diff --git a/netconf/src/message/rpc/operation/get.rs b/netconf/src/message/rpc/operation/get.rs index 177d05f..183cdc6 100644 --- a/netconf/src/message/rpc/operation/get.rs +++ b/netconf/src/message/rpc/operation/get.rs @@ -1,8 +1,8 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::Writer; -use crate::{capabilities::Requirements, message::WriteError, session::Context, Error}; +use crate::{capabilities::Requirements, session::Context, Error}; use super::{DataReply, Filter, Opaque, Operation, WriteXml}; @@ -20,7 +20,7 @@ impl Operation for Get { } impl WriteXml for Get { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { diff --git a/netconf/src/message/rpc/operation/get_config.rs b/netconf/src/message/rpc/operation/get_config.rs index bde602a..aadd4a0 100644 --- a/netconf/src/message/rpc/operation/get_config.rs +++ b/netconf/src/message/rpc/operation/get_config.rs @@ -1,13 +1,12 @@ -use std::{fmt::Debug, io::Write, marker::PhantomData}; +use std::{ + fmt::Debug, + io::{self, Write}, + marker::PhantomData, +}; use quick_xml::Writer; -use crate::{ - capabilities::Requirements, - message::{ReadXml, WriteError}, - session::Context, - Error, -}; +use crate::{capabilities::Requirements, message::ReadXml, session::Context, Error}; use super::{params::Required, DataReply, Datastore, Filter, Operation, WriteXml}; @@ -43,7 +42,7 @@ impl WriteXml for GetConfig where D: ReadXml + Debug + Send + Sync, { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { diff --git a/netconf/src/message/rpc/operation/junos/commit_configuration.rs b/netconf/src/message/rpc/operation/junos/commit_configuration.rs index 1683832..7aeaeff 100644 --- a/netconf/src/message/rpc/operation/junos/commit_configuration.rs +++ b/netconf/src/message/rpc/operation/junos/commit_configuration.rs @@ -1,4 +1,9 @@ -use std::{fmt::Debug, io::Write, sync::Arc, time::Duration}; +use std::{ + fmt::Debug, + io::{self, Write}, + sync::Arc, + time::Duration, +}; use chrono::{NaiveDateTime, NaiveTime}; use quick_xml::{events::BytesText, Writer}; @@ -10,7 +15,7 @@ use crate::{ operation::{self, Timeout}, EmptyReply, Operation, }, - WriteError, WriteXml, + WriteXml, }, session::Context, }; @@ -56,7 +61,7 @@ impl CommitConfiguration { } impl WriteXml for CommitConfiguration { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let elem = writer.create_element(Self::NAME); _ = if self.has_options() { elem.write_inner_content(|writer| { @@ -75,7 +80,7 @@ impl WriteXml for CommitConfiguration { if let Some(ref synchronize) = self.synchronize { synchronize.write_xml(writer)?; } - Ok::<_, WriteError>(()) + Ok(()) })? } else { elem.write_empty()? @@ -92,7 +97,7 @@ pub enum AtTime { } impl WriteXml for AtTime { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let value = match self { Self::AtReboot => BytesText::new("reboot"), Self::TodayAt(time) => { @@ -113,7 +118,7 @@ struct Confirm { } impl WriteXml for Confirm { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer.create_element("confirmed").write_empty()?; if self.timeout != Timeout::default() { _ = writer @@ -130,7 +135,7 @@ struct Message { } impl WriteXml for Message { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer .create_element("log") .write_text_content(BytesText::new(&self.inner))?; @@ -147,7 +152,7 @@ struct Synchronize { // The juniper docs are un-clear as to whether the and tags // should be used together or alternately... to check! impl WriteXml for Synchronize { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let tag = if self.force { "force-synchronize" } else { diff --git a/netconf/src/message/rpc/operation/junos/load_configuration.rs b/netconf/src/message/rpc/operation/junos/load_configuration.rs index fee1126..feb4440 100644 --- a/netconf/src/message/rpc/operation/junos/load_configuration.rs +++ b/netconf/src/message/rpc/operation/junos/load_configuration.rs @@ -1,4 +1,9 @@ -use std::{borrow::Cow, fmt::Debug, io::Write, sync::Arc}; +use std::{ + borrow::Cow, + fmt::Debug, + io::{self, Write}, + sync::Arc, +}; use quick_xml::{ events::{attributes::Attribute, BytesStart, Event}, @@ -14,7 +19,7 @@ use crate::{ operation::{self, params::Required}, Errors, IntoResult, Operation, }, - xmlns, ReadError, ReadXml, WriteError, WriteXml, + xmlns, ReadError, ReadXml, WriteXml, }, session::Context, }; @@ -45,7 +50,7 @@ impl WriteXml for LoadConfiguration where S: Source + Debug + Send + Sync, { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let elem = writer.create_element(Self::NAME); self.source.write_element(elem) } @@ -56,7 +61,7 @@ trait AsAttribute { } trait Source { - fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), WriteError>; + fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), io::Error>; } #[derive(Debug, Clone)] @@ -67,7 +72,7 @@ impl AsAttribute for ConfigurationRevision { } } impl Source for ConfigurationRevision { - fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), WriteError> { + fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), io::Error> { _ = elem.with_attribute(self.as_attribute()).write_empty()?; Ok(()) } @@ -81,7 +86,7 @@ impl AsAttribute for Rescue { } } impl Source for Rescue { - fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), WriteError> { + fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), io::Error> { _ = elem.with_attribute(self.as_attribute()).write_empty()?; Ok(()) } @@ -98,7 +103,7 @@ impl AsAttribute for Rollback { } } impl Source for Rollback { - fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), WriteError> { + fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), io::Error> { _ = elem.with_attribute(self.as_attribute()).write_empty()?; Ok(()) } @@ -126,7 +131,7 @@ where A: Action, D: ConfigData, { - fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), WriteError> { + fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), io::Error> { elem.with_attribute(self.format.as_attribute()) .with_attribute(self.action.as_attribute()) .write_inner_content(|writer| self.data.write_data(writer)) @@ -152,7 +157,7 @@ where A: Action, F: Format, { - fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), WriteError> { + fn write_element(&self, elem: ElementWriter<'_, W>) -> Result<(), io::Error> { _ = elem .with_attribute(self.as_attribute()) .with_attribute(self.format.as_attribute()) @@ -204,7 +209,7 @@ where F: Format, A: Action, { - fn write_data(&self, writer: &mut Writer) -> Result<(), WriteError>; + fn write_data(&self, writer: &mut Writer) -> Result<(), io::Error>; } impl ConfigData for D @@ -212,15 +217,10 @@ where D: AsRef, A: Action, { - fn write_data(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_data(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(A::TAG) - .write_inner_content(|writer| { - writer - .get_mut() - .write_all(self.as_ref().as_bytes()) - .map_err(|err| WriteError::Other(err.into())) - }) + .write_inner_content(|writer| writer.get_mut().write_all(self.as_ref().as_bytes())) .map(|_| ()) } } @@ -230,7 +230,7 @@ where D: WriteXml, A: Action, { - fn write_data(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_data(&self, writer: &mut Writer) -> Result<(), io::Error> { self.write_xml(writer) } } @@ -241,15 +241,10 @@ where D: AsRef, A: Action, { - fn write_data(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_data(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(A::TAG) - .write_inner_content(|writer| { - writer - .get_mut() - .write_all(self.as_ref().as_bytes()) - .map_err(|err| WriteError::Other(err.into())) - }) + .write_inner_content(|writer| writer.get_mut().write_all(self.as_ref().as_bytes())) .map(|_| ()) } } @@ -436,6 +431,7 @@ impl ReadXml for Reply { error_count = Some( reader .read_text(tag.to_end().name())? + .xml10_content()? .parse::() .map_err(|err| ReadError::Other(err.into()))?, ); diff --git a/netconf/src/message/rpc/operation/junos/mod.rs b/netconf/src/message/rpc/operation/junos/mod.rs index 8046586..a1f6cc6 100644 --- a/netconf/src/message/rpc/operation/junos/mod.rs +++ b/netconf/src/message/rpc/operation/junos/mod.rs @@ -166,7 +166,7 @@ macro_rules! trivial_ops { fn write_xml( &self, writer: &mut quick_xml::Writer - ) -> Result<(), $crate::message::WriteError> + ) -> Result<(), std::io::Error> where W: std::io::Write, { diff --git a/netconf/src/message/rpc/operation/junos/open_configuration.rs b/netconf/src/message/rpc/operation/junos/open_configuration.rs index fad357e..eb4ec1f 100644 --- a/netconf/src/message/rpc/operation/junos/open_configuration.rs +++ b/netconf/src/message/rpc/operation/junos/open_configuration.rs @@ -1,4 +1,7 @@ -use std::{io::Write, sync::Arc}; +use std::{ + io::{self, Write}, + sync::Arc, +}; use quick_xml::{events::BytesText, Writer}; @@ -9,7 +12,7 @@ use crate::{ operation::{self, params::Required}, Operation, }, - WriteError, WriteXml, + WriteXml, }, session::Context, }; @@ -49,7 +52,7 @@ enum Ephemeral { } impl WriteXml for OpenConfiguration { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer .create_element(Self::NAME) .write_inner_content(|writer| self.target.write_xml(writer))?; @@ -58,7 +61,7 @@ impl WriteXml for OpenConfiguration { } impl WriteXml for Target { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { match self { Self::Private => { _ = writer.create_element("private").write_empty()?; @@ -70,7 +73,7 @@ impl WriteXml for Target { } impl WriteXml for Ephemeral { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = match self { Self::Default => writer.create_element("ephemeral").write_empty()?, Self::Named(name) => writer diff --git a/netconf/src/message/rpc/operation/kill_session.rs b/netconf/src/message/rpc/operation/kill_session.rs index 7e3e5bb..525401e 100644 --- a/netconf/src/message/rpc/operation/kill_session.rs +++ b/netconf/src/message/rpc/operation/kill_session.rs @@ -1,10 +1,9 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::{events::BytesText, Writer}; use crate::{ capabilities::Requirements, - message::WriteError, session::{Context, SessionId}, Error, }; @@ -25,7 +24,7 @@ impl Operation for KillSession { } impl WriteXml for KillSession { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { diff --git a/netconf/src/message/rpc/operation/lock.rs b/netconf/src/message/rpc/operation/lock.rs index 42f282e..83bd1a1 100644 --- a/netconf/src/message/rpc/operation/lock.rs +++ b/netconf/src/message/rpc/operation/lock.rs @@ -1,8 +1,8 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::Writer; -use crate::{capabilities::Requirements, message::WriteError, session::Context, Error}; +use crate::{capabilities::Requirements, session::Context, Error}; use super::{params::Required, Datastore, EmptyReply, Operation, WriteXml}; @@ -20,7 +20,7 @@ impl Operation for Lock { } impl WriteXml for Lock { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { @@ -47,7 +47,7 @@ impl Operation for Unlock { } impl WriteXml for Unlock { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { diff --git a/netconf/src/message/rpc/operation/mod.rs b/netconf/src/message/rpc/operation/mod.rs index 915101c..5ee8681 100644 --- a/netconf/src/message/rpc/operation/mod.rs +++ b/netconf/src/message/rpc/operation/mod.rs @@ -1,6 +1,6 @@ use std::{ fmt::{self, Debug, Display}, - io::Write, + io::{self, Write}, ops::Deref, sync::Arc, time::Duration, @@ -15,7 +15,7 @@ use uuid::Uuid; use crate::{ capabilities::{Capability, Requirements}, - message::{ReadError, ReadXml, WriteError, WriteXml}, + message::{ReadError, ReadXml, WriteXml}, session::Context, Error, }; @@ -175,7 +175,7 @@ impl Datastore { } impl WriteXml for Datastore { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer.create_element(self.as_str()).write_empty()?; Ok(()) } @@ -189,18 +189,13 @@ pub enum Source { } impl WriteXml for Source { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { match self { Self::Datastore(datastore) => datastore.write_xml(writer)?, Self::Config(config) => { _ = writer .create_element("config") - .write_inner_content(|writer| { - writer - .get_mut() - .write_all(config.as_bytes()) - .map_err(|err| WriteError::Other(err.into())) - })?; + .write_inner_content(|writer| writer.get_mut().write_all(config.as_bytes()))?; } Self::Url(url) => url.write_xml(writer)?, } @@ -239,17 +234,14 @@ impl Filter { } impl WriteXml for Filter { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { let elem = writer .create_element("filter") .with_attribute(("type", self.as_str())); _ = match self { - Self::Subtree(filter) => elem.write_inner_content(|writer| { - writer - .get_mut() - .write_all(filter.as_bytes()) - .map_err(|err| WriteError::Other(err.into())) - })?, + Self::Subtree(filter) => { + elem.write_inner_content(|writer| writer.get_mut().write_all(filter.as_bytes()))? + } Self::XPath(select) => elem .with_attribute(("select", select.as_str())) .write_empty()?, @@ -274,18 +266,15 @@ impl ReadXml for Opaque { #[tracing::instrument(skip_all, fields(tag = ?start.local_name()), level = "debug")] fn read_xml(reader: &mut NsReader<&[u8]>, start: &BytesStart<'_>) -> Result { let end = start.to_end(); - let inner = reader.read_text(end.name())?.into(); + let inner = reader.read_text(end.name())?.xml10_content()?.into(); Ok(Self { inner }) } } impl WriteXml for Opaque { #[tracing::instrument(skip(writer))] - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { - writer - .get_mut() - .write_all(self.as_bytes()) - .map_err(|err| WriteError::Other(err.into())) + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { + writer.get_mut().write_all(self.as_bytes()) } } @@ -345,7 +334,7 @@ impl Display for Url { } impl WriteXml for Url { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { _ = writer .create_element("url") .write_text_content(BytesText::new(self.inner.as_str()))?; @@ -397,7 +386,7 @@ impl Timeout { impl Default for Timeout { fn default() -> Self { - Self(Duration::from_secs(600)) + Self(Duration::from_mins(10)) } } @@ -415,7 +404,7 @@ mod tests { }; let msg = format!("{reply}"); let mut reader = NsReader::from_str(msg.as_str()); - _ = reader.trim_text(true); + reader.config_mut().trim_text(true); if let Event::Start(start) = reader.read_event().unwrap() { assert_eq!(Opaque::read_xml(&mut reader, &start).unwrap(), expect); } else { diff --git a/netconf/src/message/rpc/operation/validate.rs b/netconf/src/message/rpc/operation/validate.rs index 08f5e2d..6583fae 100644 --- a/netconf/src/message/rpc/operation/validate.rs +++ b/netconf/src/message/rpc/operation/validate.rs @@ -1,10 +1,9 @@ -use std::io::Write; +use std::io::{self, Write}; use quick_xml::Writer; use crate::{ capabilities::{Capability, Requirements}, - message::WriteError, session::Context, Error, }; @@ -26,7 +25,7 @@ impl Operation for Validate { } impl WriteXml for Validate { - fn write_xml(&self, writer: &mut Writer) -> Result<(), WriteError> { + fn write_xml(&self, writer: &mut Writer) -> Result<(), io::Error> { writer .create_element(Self::NAME) .write_inner_content(|writer| { diff --git a/netconf/src/session.rs b/netconf/src/session.rs index 3200582..118b5f7 100644 --- a/netconf/src/session.rs +++ b/netconf/src/session.rs @@ -152,6 +152,10 @@ impl OutstandingRequest { #[cfg(feature = "ssh")] impl Session { /// Establish a new NETCONF session over an SSH transport. + /// + /// # Errors + /// + /// An [`Error`] is returned if the underlying SSH session fails to establish successfully. #[tracing::instrument(level = "debug")] pub async fn ssh(addr: A, username: String, password: Password) -> Result where @@ -166,6 +170,10 @@ impl Session { #[cfg(feature = "tls")] impl Session { /// Establish a new NETCONF session over a TLS transport. + /// + /// # Errors + /// + /// An [`Error`] is returned if the underlying TLS connection fails to establish successfully. #[tracing::instrument(skip(ca_cert, client_cert, client_key), level = "debug")] pub async fn tls( addr: A, @@ -188,6 +196,10 @@ impl Session { #[cfg(feature = "junos")] impl Session { /// Establish a new NETCONF session via the local Junos `cli` binary. + /// + /// # Errors + /// + /// An [`Error`] is returned if the `cli` subprocess can't be spawned successfully. #[tracing::instrument(level = "debug")] pub async fn junos_local() -> Result { tracing::info!("starting local junos transport"); @@ -248,6 +260,8 @@ impl Session { /// /// The `Output` of both the outer and inner `Future` are of type `Result`. /// + /// # Errors + /// /// An [`Err`] variant returned by awaiting the outer future indicates either a request validation /// error or a session/transport error encountered while sending the RPC request. /// @@ -332,6 +346,10 @@ impl Session { } /// Close the NETCONF session gracefully using the `` RPC operation. + /// + /// # Errors + /// + /// See [`Session::rpc`]. #[tracing::instrument(skip(self), level = "debug")] pub async fn close(mut self) -> Result>, Error> { self.rpc::(Builder::finish) diff --git a/netconf/src/transport/ssh.rs b/netconf/src/transport/ssh.rs index 2b6b40a..26047d0 100644 --- a/netconf/src/transport/ssh.rs +++ b/netconf/src/transport/ssh.rs @@ -8,10 +8,10 @@ use async_trait::async_trait; use bytes::{Bytes, BytesMut}; use memchr::memmem::Finder; use russh::{ - client::{connect, Config}, + client::{connect, AuthResult, Config}, + keys::PublicKey, ChannelMsg, }; -use russh_keys::key::PublicKey; use tokio::{net::ToSocketAddrs, sync::mpsc, task::JoinHandle}; use super::{RecvHandle, SendHandle, Transport}; @@ -40,7 +40,7 @@ impl Ssh { let session = { let mut session = connect(config, addr, handler).await?; tracing::info!("ssh session established"); - if !session + if let AuthResult::Failure { .. } = session .authenticate_password(username.clone(), password.into_inner()) .await? { @@ -164,15 +164,14 @@ impl Handler { } } -#[async_trait] impl russh::client::Handler for Handler { type Error = Error; // TODO #[tracing::instrument(skip_all)] - async fn check_server_key(self, _: &PublicKey) -> Result<(Self, bool), Self::Error> { + async fn check_server_key(&mut self, _: &PublicKey) -> Result { tracing::info!("NOT checking server public key"); - Ok((self, true)) + Ok(true) } } diff --git a/nix/platforms/junos/jetez.nix b/nix/platforms/junos/jetez.nix index b44e2a8..98cf160 100644 --- a/nix/platforms/junos/jetez.nix +++ b/nix/platforms/junos/jetez.nix @@ -1,18 +1,18 @@ { jetez-src, pkgs }: let jetez = pkgs.callPackage - ({ src, lib, python3, openssl, cdrtools, ... }: - python3.pkgs.buildPythonApplication { + ({ src, lib, python3Packages, openssl, cdrtools, ... }: + python3Packages.buildPythonApplication { pname = "jetez"; - version = "v1.0.7"; + version = "1.0.7"; + pyproject = true; inherit src; - buildInputs = [ - openssl - ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3Packages; [ setuptools ]; + dependencies = with python3Packages; [ pyyaml lxml ]; + buildInputs = [ openssl ]; makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ openssl cdrtools ] }" ]; diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 0700ec2..2a5c958 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -9,17 +9,6 @@ let src = with baseLib; cleanCargoSource (path ./../..); - devShells = mapAttrs - (toolchainName: toolchain: - let - craneLib = mkLib toolchain; - in - craneLib.devShell { - inherit checks; - } - ) - toolchains; - commonArgs = { inherit src; pname = "bgpfu"; @@ -27,6 +16,9 @@ let doCheck = false; }; + buildDeps = { toolchainName, packageName, featureSet } @ args: + toolchains.${toolchainName}.craneLib.buildDepsOnly (buildArgs args); + buildArgs = { toolchainName , packageName @@ -40,34 +32,16 @@ let if name == "default" then "" else "--no-default-features" + optionalString (length set > 0) " -F ${concatStringsSep "," set}"; - buildDeps = { toolchainName, ... } @ args: - let - toolchain = toolchains.${toolchainName}; - craneLib = mkLib toolchain; - in - craneLib.buildDepsOnly (buildArgs args); - in - commonArgs // { - pname = "${packageName}-${toolchainName}-feature-set-${name}"; - cargoExtraArgs = "-p ${packageName} ${featureArgs} ${extraExtraArgs}"; - } // optionalAttrs withDependencies { cargoArtifacts = buildDeps { inherit toolchainName packageName featureSet; }; - }; - - - mkLib = toolchain: - let craneLib = baseLib.overrideToolchain toolchain; in - craneLib // { - cargoMetadata = { ... } @ args: craneLib.mkCargoDerivation (args // { - cargoArtifacts = null; - pnameSuffix = "-metadata"; - buildPhaseCargoCommand = "cargo metadata --no-deps --format-version 1 >$out"; - doInstallCargoArtifacts = false; - installPhaseCommand = ""; - }); - }; + in + commonArgs + // { + pname = "${packageName}-${toolchainName}-feature-set-${name}"; + cargoExtraArgs = "-p ${packageName} ${featureArgs} ${extraExtraArgs}"; + } + // optionalAttrs withDependencies { inherit cargoArtifacts; }; featureSets = features: let @@ -90,9 +64,8 @@ let group.overrideAttrs (_: prev: { passthru.checks = prev.passthru.entries; }); checks = mapAttrs - (toolchainName: toolchain: + (toolchainName: { toolchain, craneLib }: let - craneLib = mkLib toolchain; metadata = importJSON (craneLib.cargoMetadata commonArgs); packages = map ({ name, features, ... }: { @@ -100,20 +73,6 @@ let featureSets = featureSets (attrNames features); }) metadata.packages; - clippy = { name, featureSets, ... }: - checkGroup name (map - (featureSet: { - inherit (featureSet) name; - path = craneLib.cargoClippy (buildArgs - { - inherit toolchainName featureSet; - packageName = name; - withDependencies = true; - } // { - cargoClippyExtraArgs = "--all-targets -- --deny warnings"; - }); - }) - featureSets); in checkGroup toolchainName { audit = craneLib.cargoAudit (commonArgs // { @@ -121,15 +80,84 @@ let }); deny = craneLib.cargoDeny commonArgs; fmt = craneLib.cargoFmt commonArgs; + taplo-fmt = craneLib.taploFmt (commonArgs // { + taploExtraArgs = "--diff"; + }); clippy = checkGroup "clippy" (map - (package: { - inherit (package) name; - path = clippy package; + ({ name, featureSets }: { + inherit name; + path = checkGroup name (map + (featureSet: { + inherit (featureSet) name; + path = craneLib.cargoClippy (buildArgs { + inherit toolchainName featureSet; + packageName = name; + withDependencies = true; + } // { + cargoClippyExtraArgs = "--all-targets -- --deny warnings"; + }); + }) + featureSets); + }) + packages); + llvm-cov = checkGroup "llvm-cov" (map + ({ name, featureSets }: { + inherit name; + path = checkGroup name (map + (featureSet: { + inherit (featureSet) name; + path = checkGroup featureSet.name (lib.mapAttrsToList + (suiteName: cargoLlvmCovExtraArgs: { + name = suiteName; + path = craneLib.cargoLlvmCov (buildArgs { + inherit toolchainName featureSet; + packageName = name; + withDependencies = true; + } // { + inherit cargoLlvmCovExtraArgs; + }); + }) + { + all = "--lcov --output-path $out"; + }); + }) + featureSets); }) packages); }) toolchains; + devShells = mapAttrs + (toolchainName: { craneLib, ... }: + let + checksForToolchain = + let + pred = value: value ? checks; + name = path: lib.concatStringsSep "_" path; + item = path: value: lib.nameValuePair (name path) value; + mapRecursive = path: value: + if lib.isAttrs value && pred value + then recurse path value + else [ (item path value) ]; + recurse = path: set: lib.concatMap + (name: mapRecursive (path ++ [ name ]) set.checks.${name}) + (lib.attrNames set.checks); + in lib.listToAttrs (recurse [ ] checks.${toolchainName}); + # checksForToolchain = checks.${toolchainName}.checks; + # basicChecks = checks: lib.filterAtttrs (n: v: !(v ? checks)) checks; + # clippyChecks = lib.mapAttrs' (n: v: nameValuePair "clippy-${n}" v.checks.default) checksForToolchain.clippy.checks; + # llvmChecks = lib.mapAttrs' (n: v: nameValuePair "llvm-cov-${n}" v.checks.default) checksForToolchain.llvm-cov.checks; + in + craneLib.devShell { + checks = checksForToolchain; + # checks = clippyChecks // { + # inherit (checksForToolchain) audit deny fmt taplo-fmt llvm-cov; + # }; + } + ) + toolchains; + + buildBinWith = { platforms, toolchainName }: { pname , bin ? pname @@ -137,8 +165,7 @@ let , extraPlatforms ? [ ] }: let - toolchain = toolchains.${toolchainName}; - craneLib = mkLib toolchain; + inherit (toolchains.${toolchainName}) craneLib; meta = let metadata = importJSON (craneLib.cargoMetadata commonArgs); diff --git a/nix/rust/default.nix b/nix/rust/default.nix index ef00634..3a11dc8 100644 --- a/nix/rust/default.nix +++ b/nix/rust/default.nix @@ -7,7 +7,7 @@ let }; toolchains = import ./toolchains.nix { - inherit pkgs fenix platforms toolchainManifests; + inherit pkgs crane fenix platforms toolchainManifests; }; cargo = import ./cargo.nix { diff --git a/nix/rust/toolchains.nix b/nix/rust/toolchains.nix index 6c7d87c..071586a 100644 --- a/nix/rust/toolchains.nix +++ b/nix/rust/toolchains.nix @@ -1,8 +1,8 @@ -{ pkgs, fenix, platforms, toolchainManifests }: +{ pkgs, crane, fenix, platforms, toolchainManifests }: let - inherit (pkgs) system lib; - inherit (builtins) mapAttrs map; - inherit (lib) filterAttrs mapAttrsToList; + inherit (pkgs) lib; + inherit (pkgs.stdenv.hostPlatform) system; + inherit (lib) filterAttrs map mapAttrs mapAttrsToList; fenixPkgs = fenix.packages.${system}; @@ -30,7 +30,24 @@ let rust-src ] ++ crossComponents manifest; + mkCraneLib = toolchain: + let + baseLib = crane.mkLib pkgs; + craneLib = baseLib.overrideToolchain toolchain; + in + craneLib // { + cargoMetadata = { ... } @ args: craneLib.mkCargoDerivation (args // { + cargoArtifacts = null; + pnameSuffix = "-metadata"; + buildPhaseCargoCommand = "cargo metadata --no-deps --format-version 1 >$out"; + doInstallCargoArtifacts = false; + installPhaseCommand = ""; + }); + }; in mapAttrs - (_: manifest: fenixPkgs.combine (components manifest)) + (_: manifest: rec { + toolchain = fenixPkgs.combine (components manifest); + craneLib = mkCraneLib toolchain; + }) toolchainManifests From 1bd603b3491980c7930a9c335a3bad1cb7e03489 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Wed, 20 May 2026 12:41:27 +0200 Subject: [PATCH 05/29] Drop unmaintained dependencies - replace `paste` with `pastey` - drop `rusttls-pemfile` --- Cargo.lock | 19 ++------ Cargo.toml | 3 +- junos-agent/Cargo.toml | 1 - junos-agent/src/netconf/mod.rs | 8 ++-- junos-agent/src/netconf/pem.rs | 43 +++---------------- netconf/Cargo.toml | 5 +-- netconf/examples/ephemeral.rs | 41 ++++-------------- netconf/examples/tls.rs | 41 ++++-------------- netconf/src/lib.rs | 1 - .../src/message/rpc/operation/junos/mod.rs | 2 +- 10 files changed, 34 insertions(+), 130 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 127c1e7..5eb83d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,7 +257,6 @@ dependencies = [ "quick-xml", "rolling-file", "rpsl", - "rustls-pemfile", "rustls-pki-types", "tokio", "tracing", @@ -292,10 +291,9 @@ dependencies = [ "clap-verbosity-flag", "iri-string", "memchr", - "paste", + "pastey", "quick-xml", "russh", - "rustls-pemfile", "rustls-pki-types", "thiserror 2.0.18", "tokio", @@ -1788,10 +1786,10 @@ dependencies = [ ] [[package]] -name = "paste" -version = "1.0.15" +name = "pastey" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "c5a797f0e07bdf071d15742978fc3128ec6c22891c31a3a931513263904c982a" [[package]] name = "pbkdf2" @@ -2366,15 +2364,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.14.1" diff --git a/Cargo.toml b/Cargo.toml index 7cffcc2..2eec1c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,12 +30,11 @@ generic-ip = "^0.1.1" iri-string = "^0.7" irrc = "^0.1" memchr = "^2.0" -paste = "^1.0" +pastey = "^0.2" quick-xml = "^0.40" rolling-file = "^0.2.0" rpsl = "^0.1" russh = "^0.60" -rustls-pemfile = "^2.0" rustls-pki-types = "^1.0" thiserror = "^2.0" tokio = { version = "^1.0", default-features = false } diff --git a/junos-agent/Cargo.toml b/junos-agent/Cargo.toml index 77acd1a..e344a98 100644 --- a/junos-agent/Cargo.toml +++ b/junos-agent/Cargo.toml @@ -25,7 +25,6 @@ generic-ip.workspace = true quick-xml.workspace = true rolling-file.workspace = true rpsl.workspace = true -rustls-pemfile.workspace = true rustls-pki-types.workspace = true tracing.workspace = true tracing-appender.workspace = true diff --git a/junos-agent/src/netconf/mod.rs b/junos-agent/src/netconf/mod.rs index 29af010..6632b44 100644 --- a/junos-agent/src/netconf/mod.rs +++ b/junos-agent/src/netconf/mod.rs @@ -21,7 +21,7 @@ use crate::{ }; mod pem; -use self::pem::{read_cert, read_private_key}; +use self::pem::read_item; pub(crate) trait Target: Debug + Clone + Sized + Send { type Transport: Transport; @@ -75,9 +75,9 @@ impl Target for Remote { ); tracing::debug!(?ca_cert_path, ?client_cert_path, ?client_key_path); let (ca_cert, client_cert, client_key) = tokio::try_join!( - read_cert(ca_cert_path), - read_cert(client_cert_path), - read_private_key(client_key_path) + read_item(ca_cert_path), + read_item(client_cert_path), + read_item(client_key_path) )?; let server_name = match self.opts.tls_server_name() { Some(name) => name, diff --git a/junos-agent/src/netconf/pem.rs b/junos-agent/src/netconf/pem.rs index 5ded0c2..03dd66c 100644 --- a/junos-agent/src/netconf/pem.rs +++ b/junos-agent/src/netconf/pem.rs @@ -2,29 +2,14 @@ use std::path::Path; use anyhow::Context; -use rustls_pemfile::{read_one_from_slice, Error, Item}; - -use rustls_pki_types::{CertificateDer, PrivateKeyDer}; +use rustls_pki_types::pem::PemObject; use tokio::{fs::File, io::AsyncReadExt}; -pub(super) async fn read_cert(path: &Path) -> anyhow::Result> { - match read_one_async(path).await? { - Item::X509Certificate(cert) => Ok(cert), - item => anyhow::bail!("expected X.509 certificate, got {item:?}"), - } -} - -pub(super) async fn read_private_key(path: &Path) -> anyhow::Result> { - match read_one_async(path).await? { - Item::Pkcs1Key(key) => Ok(key.into()), - Item::Pkcs8Key(key) => Ok(key.into()), - Item::Sec1Key(key) => Ok(key.into()), - item => anyhow::bail!("expected private key, got {item:?}"), - } -} - -async fn read_one_async(path: &Path) -> anyhow::Result { +pub(super) async fn read_item(path: &Path) -> anyhow::Result +where + T: PemObject, +{ let input = { let mut buf = Vec::new(); _ = File::open(path) @@ -35,21 +20,5 @@ async fn read_one_async(path: &Path) -> anyhow::Result { .context("failed to read PEM file contents")?; buf }; - read_one_from_slice(&input) - .map_err(|err| { - let msg = match err { - Error::MissingSectionEnd { end_marker } => format!( - "section end {:?} missing", - String::from_utf8_lossy(&end_marker) - ), - Error::IllegalSectionStart { line } => format!( - "illegal section start: {:?}", - String::from_utf8_lossy(&line) - ), - Error::Base64Decode(msg) => msg, - }; - anyhow::anyhow!("failed to decode PEM file contents: {msg}") - })? - .ok_or_else(|| anyhow::anyhow!("no PEM section found in file contents")) - .map(|(item, _)| item) + T::from_pem_slice(&input).context("error while decoding PEM object") } diff --git a/netconf/Cargo.toml b/netconf/Cargo.toml index 8fab698..364edaf 100644 --- a/netconf/Cargo.toml +++ b/netconf/Cargo.toml @@ -25,7 +25,7 @@ tls = [ "tokio/macros", "tokio/net", ] -junos = ["dep:chrono", "dep:paste", "tokio/process"] +junos = ["dep:chrono", "dep:pastey", "tokio/process"] [dependencies] async-trait.workspace = true @@ -38,7 +38,7 @@ tokio.workspace = true tracing.workspace = true uuid.workspace = true chrono = { workspace = true, optional = true } -paste = { workspace = true, optional = true } +pastey = { workspace = true, optional = true } russh = { workspace = true, optional = true } rustls-pki-types = { workspace = true, optional = true } tokio-rustls = { workspace = true, optional = true } @@ -48,7 +48,6 @@ tokio-rustls = { workspace = true, optional = true } anyhow.workspace = true clap.workspace = true clap-verbosity-flag.workspace = true -rustls-pemfile.workspace = true tracing-log.workspace = true tracing-subscriber.workspace = true version-sync.workspace = true diff --git a/netconf/examples/ephemeral.rs b/netconf/examples/ephemeral.rs index 14ac290..2fa95c8 100644 --- a/netconf/examples/ephemeral.rs +++ b/netconf/examples/ephemeral.rs @@ -1,13 +1,9 @@ -use std::{ - fs::File, - io::{stderr, BufReader}, - path::{Path, PathBuf}, -}; +use std::{io::stderr, path::PathBuf}; use anyhow::{anyhow, Context}; use clap::Parser; use clap_verbosity_flag::{Verbosity, WarnLevel}; -use rustls_pki_types::{CertificateDer, PrivateKeyDer}; +use rustls_pki_types::{pem::PemObject as _, CertificateDer, PrivateKeyDer}; use tracing_log::AsTrace; use netconf::{ @@ -27,10 +23,12 @@ async fn main() -> anyhow::Result<()> { .try_init() .map_err(|err| anyhow!(err))?; let addr = (args.host.as_str(), args.port); - let ca_cert = read_cert(&args.ca_cert).context("failed to read CA certificate")?; - let client_cert = read_cert(&args.client_cert).context("failed to read client certificate")?; - let client_key = - read_private_key(&args.client_key).context("failed to read client private key")?; + let ca_cert = + CertificateDer::from_pem_file(&args.ca_cert).context("failed to read CA certificate")?; + let client_cert = CertificateDer::from_pem_file(&args.client_cert) + .context("failed to read client certificate")?; + let client_key = PrivateKeyDer::from_pem_file(&args.client_key) + .context("failed to read client private key")?; let mut session = Session::tls(addr, args.server_name, ca_cert, client_cert, client_key) .await .context("failed to establish netconf session")?; @@ -94,29 +92,6 @@ async fn main() -> anyhow::Result<()> { Ok(()) } -fn read_cert(path: &Path) -> anyhow::Result> { - File::open(path) - .context("failed to open certificate file") - .map(BufReader::new) - .and_then(|ref mut reader| { - match rustls_pemfile::read_one(reader).context("failed to read certificate file")? { - Some(rustls_pemfile::Item::X509Certificate(cert)) => Ok(cert), - Some(item) => Err(anyhow!("expected X.509 certificate, got {item:?}")), - None => Err(anyhow!("no certificate found in file '{}'", path.display())), - } - }) -} - -fn read_private_key(path: &Path) -> anyhow::Result> { - File::open(path) - .context("failed to open private key file") - .map(BufReader::new) - .and_then(|ref mut reader| { - rustls_pemfile::private_key(reader).context("failed to read private key file") - })? - .ok_or_else(|| anyhow::anyhow!("no private key found in file '{}'", path.display())) -} - #[derive(Debug, Parser)] #[command(author, version)] struct Cli { diff --git a/netconf/examples/tls.rs b/netconf/examples/tls.rs index 699974d..57ec25f 100644 --- a/netconf/examples/tls.rs +++ b/netconf/examples/tls.rs @@ -1,13 +1,9 @@ -use std::{ - fs::File, - io::{stderr, BufReader}, - path::{Path, PathBuf}, -}; +use std::{io::stderr, path::PathBuf}; use anyhow::{anyhow, Context}; use clap::Parser; use clap_verbosity_flag::{Verbosity, WarnLevel}; -use rustls_pki_types::{CertificateDer, PrivateKeyDer}; +use rustls_pki_types::{pem::PemObject, CertificateDer, PrivateKeyDer}; use tracing_log::AsTrace as _; use netconf::{ @@ -24,10 +20,12 @@ async fn main() -> anyhow::Result<()> { .try_init() .map_err(|err| anyhow!(err))?; let addr = (args.host.as_str(), args.port); - let ca_cert = read_cert(&args.ca_cert).context("failed to read CA certificate")?; - let client_cert = read_cert(&args.client_cert).context("failed to read client certificate")?; - let client_key = - read_private_key(&args.client_key).context("failed to read client private key")?; + let ca_cert = + CertificateDer::from_pem_file(&args.ca_cert).context("failed to read CA certificate")?; + let client_cert = CertificateDer::from_pem_file(&args.client_cert) + .context("failed to read client certificate")?; + let client_key = PrivateKeyDer::from_pem_file(&args.client_key) + .context("failed to read client private key")?; let mut session = Session::tls(addr, args.server_name, ca_cert, client_cert, client_key) .await .context("failed to establish netconf session")?; @@ -41,29 +39,6 @@ async fn main() -> anyhow::Result<()> { Ok(()) } -fn read_cert(path: &Path) -> anyhow::Result> { - File::open(path) - .context("failed to open certificate file") - .map(BufReader::new) - .and_then(|ref mut reader| { - match rustls_pemfile::read_one(reader).context("failed to read certificate file")? { - Some(rustls_pemfile::Item::X509Certificate(cert)) => Ok(cert), - Some(item) => Err(anyhow!("expected X.509 certificate, got {item:?}")), - None => Err(anyhow!("no certificate found in file '{}'", path.display())), - } - }) -} - -fn read_private_key(path: &Path) -> anyhow::Result> { - File::open(path) - .context("failed to open private key file") - .map(BufReader::new) - .and_then(|ref mut reader| { - rustls_pemfile::private_key(reader).context("failed to read private key file") - })? - .ok_or_else(|| anyhow::anyhow!("no private key found in file '{}'", path.display())) -} - #[derive(Debug, Parser)] #[command(author, version)] struct Cli { diff --git a/netconf/src/lib.rs b/netconf/src/lib.rs index 3e5744e..01066f6 100644 --- a/netconf/src/lib.rs +++ b/netconf/src/lib.rs @@ -65,7 +65,6 @@ mod deps { use anyhow as _; use clap as _; use clap_verbosity_flag as _; - use rustls_pemfile as _; use tracing_log as _; use tracing_subscriber as _; use version_sync as _; diff --git a/netconf/src/message/rpc/operation/junos/mod.rs b/netconf/src/message/rpc/operation/junos/mod.rs index a1f6cc6..1651570 100644 --- a/netconf/src/message/rpc/operation/junos/mod.rs +++ b/netconf/src/message/rpc/operation/junos/mod.rs @@ -139,7 +139,7 @@ macro_rules! trivial_ops { const NAME = $name:literal; } )* ) => { - paste::paste! { + pastey::paste! { $( #[doc(inline)] $vis use self::[<$oper_ty:snake>]::$oper_ty; From 07685c3e3387408a23d077952ce63b45428bcd6c Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Thu, 21 May 2026 10:14:19 +0200 Subject: [PATCH 06/29] remove usage of removed `doc_auto_cfg` feature --- cli/src/lib.rs | 2 +- junos-agent/src/lib.rs | 2 +- lib/src/lib.rs | 2 +- netconf/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/lib.rs b/cli/src/lib.rs index aec2efb..2e7db91 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -39,7 +39,7 @@ #![warn(unused_results)] #![warn(variant_size_differences)] // docs.rs build config -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] mod cli; pub use self::cli::main; diff --git a/junos-agent/src/lib.rs b/junos-agent/src/lib.rs index b8161e9..167f2b9 100644 --- a/junos-agent/src/lib.rs +++ b/junos-agent/src/lib.rs @@ -39,7 +39,7 @@ #![warn(unused_results)] #![warn(variant_size_differences)] // docs.rs build config -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] mod cli; pub use self::cli::main; diff --git a/lib/src/lib.rs b/lib/src/lib.rs index f399430..9ba6af4 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -39,7 +39,7 @@ #![warn(unused_results)] #![warn(variant_size_differences)] // docs.rs build config -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] /// Error types mod error; diff --git a/netconf/src/lib.rs b/netconf/src/lib.rs index 01066f6..95b3ace 100644 --- a/netconf/src/lib.rs +++ b/netconf/src/lib.rs @@ -39,7 +39,7 @@ #![warn(variant_size_differences)] #![cfg_attr(any(feature = "ssh", feature = "tls"), warn(unused_crate_dependencies))] // docs.rs build config -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] // omit everything if we don't have a transport feature enabled #![cfg(any(feature = "ssh", feature = "tls"))] From 1d23501a0da94df9c1aaddfad0d9292eaab8f757 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Thu, 21 May 2026 10:14:56 +0200 Subject: [PATCH 07/29] add `cargo doc` checks --- flake.lock | 2 +- nix/rust/cargo.nix | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 8aba096..bf01095 100644 --- a/flake.lock +++ b/flake.lock @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-fag2Phz5+66uiq2HTr3P8C2IiGdak9BRv0j8LfaTiyA=", + "narHash": "sha256-zwH+HR9Js1d317bnBkqdFSp7B4E/6fg1GA0+ex/D/I8=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 2a5c958..2a37cd1 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -30,6 +30,7 @@ let inherit (featureSet) name set; featureArgs = if name == "default" then "" + else if name == "all" then "--all-features" else "--no-default-features" + optionalString (length set > 0) " -F ${concatStringsSep "," set}"; cargoArtifacts = buildDeps { @@ -54,8 +55,10 @@ let else concatStringsSep "+" set; nonDefaultFeatures = remove "default" features; in - [{ name = "default"; set = null; }] - ++ optionals (length features > 0) (map + [ + { name = "default"; set = null; } + { name = "all"; set = null; } + ] ++ optionals (length features > 0) (map (set: { name = setName set; inherit set; }) (powerSet nonDefaultFeatures)); @@ -83,6 +86,23 @@ let taplo-fmt = craneLib.taploFmt (commonArgs // { taploExtraArgs = "--diff"; }); + docs = checkGroup "docs" (map + ({ name, ... }: { + inherit name; + path = craneLib.cargoDoc (buildArgs { + inherit toolchainName; + featureSet = { name = "all"; set = null; }; + packageName = name; + withDependencies = true; + } // { + RUSTDOCFLAGS = concatStringsSep " " ([ + "-D warnings" + ] ++ optionals (toolchainName == "nightly") [ + "--cfg docsrs " + ]); + }); + }) + packages); clippy = checkGroup "clippy" (map ({ name, featureSets }: { inherit name; From c3d3d262d0047beb50334b42b2a65d026f230a24 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 29 May 2026 09:59:34 +0200 Subject: [PATCH 08/29] update `nightly` manifest --- flake.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index bf01095..787217d 100644 --- a/flake.lock +++ b/flake.lock @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-zwH+HR9Js1d317bnBkqdFSp7B4E/6fg1GA0+ex/D/I8=", + "narHash": "sha256-RuFZlCIE6ZDmVt7quE0dECLf1dlxipyxOJQimOEpkPQ=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, From 7102c59e05e1f86f374a8c467424482f42f22f15 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 29 May 2026 10:02:43 +0200 Subject: [PATCH 09/29] enable bash completion and set `CARGO_HOME` in dev shells --- nix/rust/cargo.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 2a37cd1..cfe9fc1 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -148,7 +148,7 @@ let toolchains; devShells = mapAttrs - (toolchainName: { craneLib, ... }: + (toolchainName: { craneLib, toolchain }: let checksForToolchain = let @@ -163,16 +163,14 @@ let (name: mapRecursive (path ++ [ name ]) set.checks.${name}) (lib.attrNames set.checks); in lib.listToAttrs (recurse [ ] checks.${toolchainName}); - # checksForToolchain = checks.${toolchainName}.checks; - # basicChecks = checks: lib.filterAtttrs (n: v: !(v ? checks)) checks; - # clippyChecks = lib.mapAttrs' (n: v: nameValuePair "clippy-${n}" v.checks.default) checksForToolchain.clippy.checks; - # llvmChecks = lib.mapAttrs' (n: v: nameValuePair "llvm-cov-${n}" v.checks.default) checksForToolchain.llvm-cov.checks; in craneLib.devShell { checks = checksForToolchain; - # checks = clippyChecks // { - # inherit (checksForToolchain) audit deny fmt taplo-fmt llvm-cov; - # }; + TOOLCHAIN = toolchain; + shellHook = '' + export CARGO_HOME="$XDG_DATA_HOME/cargo" + source "$TOOLCHAIN/etc/bash_completion.d/cargo" + ''; } ) toolchains; From a7b6a159d46325d668751def647a5de389e2bf54 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 29 May 2026 10:03:31 +0200 Subject: [PATCH 10/29] unify `docs` check --- nix/rust/cargo.nix | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index cfe9fc1..7e669f4 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -86,23 +86,19 @@ let taplo-fmt = craneLib.taploFmt (commonArgs // { taploExtraArgs = "--diff"; }); - docs = checkGroup "docs" (map - ({ name, ... }: { - inherit name; - path = craneLib.cargoDoc (buildArgs { - inherit toolchainName; - featureSet = { name = "all"; set = null; }; - packageName = name; - withDependencies = true; - } // { - RUSTDOCFLAGS = concatStringsSep " " ([ - "-D warnings" - ] ++ optionals (toolchainName == "nightly") [ - "--cfg docsrs " - ]); - }); - }) - packages); + docs = craneLib.cargoDoc (commonArgs // rec { + pname = "bgpfu-${toolchainName}"; + cargoExtraArgs = "--workspace --all-features"; + cargoArtifacts = craneLib.buildDepsOnly { + inherit src pname cargoExtraArgs; + }; + cargoDocExtraArgs = "--no-deps --lib"; + RUSTDOCFLAGS = concatStringsSep " " ([ + "-D warnings" + ] ++ optionals (toolchainName == "nightly") [ + "--cfg docsrs" + ]); + }); clippy = checkGroup "clippy" (map ({ name, featureSets }: { inherit name; From b33b3436d66110f17083aafa86a12cb211115f3b Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Tue, 2 Jun 2026 14:58:29 +0200 Subject: [PATCH 11/29] dynamically generate ci matrix --- .github/workflows/cicd.yml | 38 ++++++++++++++++++++++++++++++++++++++ flake.lock | 10 +++++----- nix/rust/cargo.nix | 14 +++++++++++--- 3 files changed, 54 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a25f2ec..5f79e83 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -35,6 +35,44 @@ jobs: secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + generate-matrix: + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: [msrv, stable, nightly] + outputs: + matrix: ${{ steps.generate.outputs.matrix }} + steps: + - uses: actions/checkout@v5 + - uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v17 + with: + name: wolcomm-public + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - run: | + nix build .#checks.x86-64_linux.${TOOLCHAIN} + echo "matrix=$(> ${GITHUB_OUTPUT} + env: + TOOLCHAIN: ${{ matrix.toolchain }} + + checks: + runs-on: ubuntu-latest + needs: generate-matrix + matrix: + toolchain: [msrv, stable, nightly] + check: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} + steps: + - uses: actions/checkout@v5 + - uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v17 + with: + name: wolcomm-public + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - run: nix build .#checks.x86-64_linux.${TOOLCHAIN}.checks.${CHECK} + env: + TOOLCHAIN: ${{ matrix.toolchain }} + CHECK: ${{ matrix.check }} + flake-check: runs-on: ubuntu-latest steps: diff --git a/flake.lock b/flake.lock index 787217d..241a880 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1777660670, - "narHash": "sha256-C8hgon8MOPJWA67TH1PHEziDwpsSdJN2CpFdKTwb6ZI=", + "lastModified": 1780080926, + "narHash": "sha256-WMmi1qorE6Rh98iA1KgWsPMEi3vA2V4G4l6/88uEdng=", "owner": "rustsec", "repo": "advisory-db", - "rev": "20377f44edabca7c4a765ccdcd05935331b6191f", + "rev": "eaf48e749baa3d5e27d304107d8abf175fd756bb", "type": "github" }, "original": { @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-RuFZlCIE6ZDmVt7quE0dECLf1dlxipyxOJQimOEpkPQ=", + "narHash": "sha256-4HjHw91VivVdBqLQRX2Tv5Rv3jSM2S84BwsQwlLL+jU=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, @@ -160,7 +160,7 @@ "stable-manifest": { "flake": false, "locked": { - "narHash": "sha256-gOowX/J8r9U9Y3H0PNdAUI0W/e6BGX3tsWh/bA+SnpQ=", + "narHash": "sha256-kCHJPWyoX76/Y5AHs7Zga+sH+imvZ14GcpiinNNMUbk=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-stable.toml" }, diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 7e669f4..43d593b 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -1,6 +1,6 @@ { pkgs, crane, toolchains, advisory-db, src }: let - inherit (pkgs) lib linkFarm; + inherit (pkgs) lib linkFarm writeTextFile; inherit (builtins) attrNames length listToAttrs mapAttrs; inherit (lib) concatStringsSep findSingle importJSON nameValuePair optionals optionalAttrs optionalString remove; @@ -63,8 +63,16 @@ let (powerSet nonDefaultFeatures)); checkGroup = name: entries: - let group = linkFarm "${name}-checks" entries; in - group.overrideAttrs (_: prev: { passthru.checks = prev.passthru.entries; }); + let + group = linkFarm "${name}-checks" entries; + matrix = pkgs.writeText "matrix.json" (builtins.toJSON (lib.attrNames entries)); + in + group.overrideAttrs (_: prev: { + passthru = { + inherit matrix; + checks = prev.passthru.entries; + }; + }); checks = mapAttrs (toolchainName: { toolchain, craneLib }: From 0952312e3acc6aaf3e08d427ea3fb9ca3d311648 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Tue, 2 Jun 2026 15:00:16 +0200 Subject: [PATCH 12/29] fix workflow file --- .github/workflows/cicd.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 5f79e83..2ebe338 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -58,9 +58,10 @@ jobs: checks: runs-on: ubuntu-latest needs: generate-matrix - matrix: - toolchain: [msrv, stable, nightly] - check: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} + strategy: + matrix: + toolchain: [msrv, stable, nightly] + check: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} steps: - uses: actions/checkout@v5 - uses: cachix/install-nix-action@v31 From 5579ffc5e5f6c16c6bc03063060305b2feec2d5f Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Tue, 2 Jun 2026 15:04:15 +0200 Subject: [PATCH 13/29] fix target name --- .github/workflows/cicd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2ebe338..7182ef2 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -50,7 +50,7 @@ jobs: name: wolcomm-public authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - run: | - nix build .#checks.x86-64_linux.${TOOLCHAIN} + nix build .#checks.x86_64-linux.${TOOLCHAIN} echo "matrix=$(> ${GITHUB_OUTPUT} env: TOOLCHAIN: ${{ matrix.toolchain }} @@ -69,7 +69,7 @@ jobs: with: name: wolcomm-public authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - - run: nix build .#checks.x86-64_linux.${TOOLCHAIN}.checks.${CHECK} + - run: nix build .#checks.x86_64-linux.${TOOLCHAIN}.checks.${CHECK} env: TOOLCHAIN: ${{ matrix.toolchain }} CHECK: ${{ matrix.check }} From bf1e7a7cb19dfc79f889060e817aca12115e5690 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Tue, 2 Jun 2026 15:06:38 +0200 Subject: [PATCH 14/29] fix workflow file --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 7182ef2..c8d0966 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -50,7 +50,7 @@ jobs: name: wolcomm-public authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - run: | - nix build .#checks.x86_64-linux.${TOOLCHAIN} + nix build .#checks.x86_64-linux.${TOOLCHAIN}.matrix echo "matrix=$(> ${GITHUB_OUTPUT} env: TOOLCHAIN: ${{ matrix.toolchain }} From 7bc21c55f29f8993bbaa98830cedc958fa9b1091 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Wed, 3 Jun 2026 12:56:16 +0200 Subject: [PATCH 15/29] add id to workflow step --- .github/workflows/cicd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c8d0966..7f7f8da 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -49,7 +49,8 @@ jobs: with: name: wolcomm-public authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - - run: | + - id: generate + run: | nix build .#checks.x86_64-linux.${TOOLCHAIN}.matrix echo "matrix=$(> ${GITHUB_OUTPUT} env: From 0976717eab94e95d02f2a6e82c54b74265f2fe4b Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Wed, 3 Jun 2026 13:00:57 +0200 Subject: [PATCH 16/29] update nightly manifest --- flake.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 241a880..467769b 100644 --- a/flake.lock +++ b/flake.lock @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-4HjHw91VivVdBqLQRX2Tv5Rv3jSM2S84BwsQwlLL+jU=", + "narHash": "sha256-cMGb7Ync7Je46qUpTkQUsx3Tk3AaKYlMWpTgpzL0M+c=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, From 125580a7fe1439e987592ce2acf358ae2176005a Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Wed, 3 Jun 2026 13:01:21 +0200 Subject: [PATCH 17/29] disable fail-fast --- .github/workflows/cicd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 7f7f8da..0bb0ce5 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -38,6 +38,7 @@ jobs: generate-matrix: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: toolchain: [msrv, stable, nightly] outputs: @@ -60,6 +61,7 @@ jobs: runs-on: ubuntu-latest needs: generate-matrix strategy: + fail-fast: false matrix: toolchain: [msrv, stable, nightly] check: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} From 07490c9623f1ed268f1abe1f923f7fb236b89214 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Thu, 11 Jun 2026 13:36:41 +0200 Subject: [PATCH 18/29] update inputs --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 467769b..3ee2147 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1780080926, - "narHash": "sha256-WMmi1qorE6Rh98iA1KgWsPMEi3vA2V4G4l6/88uEdng=", + "lastModified": 1781177708, + "narHash": "sha256-kPEHVvF8LezCSBN4AXlsVK+4BsC3upoJK4wD1IjB/lo=", "owner": "rustsec", "repo": "advisory-db", - "rev": "eaf48e749baa3d5e27d304107d8abf175fd756bb", + "rev": "254ee9eb7b48bdbdab5773add0cbd5f17273f4f5", "type": "github" }, "original": { @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-cMGb7Ync7Je46qUpTkQUsx3Tk3AaKYlMWpTgpzL0M+c=", + "narHash": "sha256-aXRfzU2T7SoOYeaKSMfggUoErGR7MI/1zAUfy+QNk28=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, From 4a7ac1a6d7190e2def74e203a888908786122f70 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Thu, 11 Jun 2026 13:37:30 +0200 Subject: [PATCH 19/29] collect flattened checks for gh actions matrix --- .github/workflows/cicd.yml | 22 +++++++++--------- nix/rust/cargo.nix | 47 +++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 0bb0ce5..5037c34 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -72,21 +72,21 @@ jobs: with: name: wolcomm-public authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - - run: nix build .#checks.x86_64-linux.${TOOLCHAIN}.checks.${CHECK} + - run: nix build .#checks.x86_64-linux.${TOOLCHAIN}.flatChecks.${CHECK} env: TOOLCHAIN: ${{ matrix.toolchain }} CHECK: ${{ matrix.check }} - flake-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: cachix/install-nix-action@v31 - - uses: cachix/cachix-action@v17 - with: - name: wolcomm-public - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - - run: nix flake check + # flake-check: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v5 + # - uses: cachix/install-nix-action@v31 + # - uses: cachix/cachix-action@v17 + # with: + # name: wolcomm-public + # authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + # - run: nix flake check build-junos-agent: name: build-junos-agent diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 43d593b..ace4510 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -1,7 +1,7 @@ { pkgs, crane, toolchains, advisory-db, src }: let - inherit (pkgs) lib linkFarm writeTextFile; - inherit (builtins) attrNames length listToAttrs mapAttrs; + inherit (pkgs) lib linkFarm writeText; + inherit (builtins) attrNames length listToAttrs mapAttrs toJSON; inherit (lib) concatStringsSep findSingle importJSON nameValuePair optionals optionalAttrs optionalString remove; @@ -65,12 +65,27 @@ let checkGroup = name: entries: let group = linkFarm "${name}-checks" entries; - matrix = pkgs.writeText "matrix.json" (builtins.toJSON (lib.attrNames entries)); in - group.overrideAttrs (_: prev: { - passthru = { - inherit matrix; + group.overrideAttrs (_: prev: + let checks = prev.passthru.entries; + flatChecks = + let + pred = value: value ? checks; + name = path: lib.concatStringsSep "_" path; + item = path: value: lib.nameValuePair (name path) value; + mapRecursive = path: value: + if lib.isAttrs value && pred value + then recurse path value.checks + else [ (item path value) ]; + recurse = path: set: lib.concatMap + (name: mapRecursive (path ++ [ name ]) set.${name}) + (lib.attrNames set); + in lib.listToAttrs (recurse [ ] checks); + matrix = writeText "${name}-matrix.json" (toJSON (attrNames flatChecks)); + in { + passthru = { + inherit checks matrix flatChecks; }; }); @@ -153,30 +168,14 @@ let devShells = mapAttrs (toolchainName: { craneLib, toolchain }: - let - checksForToolchain = - let - pred = value: value ? checks; - name = path: lib.concatStringsSep "_" path; - item = path: value: lib.nameValuePair (name path) value; - mapRecursive = path: value: - if lib.isAttrs value && pred value - then recurse path value - else [ (item path value) ]; - recurse = path: set: lib.concatMap - (name: mapRecursive (path ++ [ name ]) set.checks.${name}) - (lib.attrNames set.checks); - in lib.listToAttrs (recurse [ ] checks.${toolchainName}); - in craneLib.devShell { - checks = checksForToolchain; + checks = checks.${toolchainName}.flatChecks; TOOLCHAIN = toolchain; shellHook = '' export CARGO_HOME="$XDG_DATA_HOME/cargo" source "$TOOLCHAIN/etc/bash_completion.d/cargo" ''; - } - ) + }) toolchains; From 4b0a88de1eb22693d32a1f6de58ce78642f98d21 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 19 Jun 2026 08:56:33 +0200 Subject: [PATCH 20/29] factor out cargo metadata generation --- nix/rust/cargo.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index ace4510..20ae97f 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -16,6 +16,9 @@ let doCheck = false; }; + workspaceMetadata = toolchainName: + importJSON (toolchains.${toolchainName}.craneLib.cargoMetadata commonArgs); + buildDeps = { toolchainName, packageName, featureSet } @ args: toolchains.${toolchainName}.craneLib.buildDepsOnly (buildArgs args); @@ -92,7 +95,7 @@ let checks = mapAttrs (toolchainName: { toolchain, craneLib }: let - metadata = importJSON (craneLib.cargoMetadata commonArgs); + metadata = workspaceMetadata toolchainName; packages = map ({ name, features, ... }: { inherit name; @@ -171,6 +174,7 @@ let craneLib.devShell { checks = checks.${toolchainName}.flatChecks; TOOLCHAIN = toolchain; + WORKSPACE_METADATA = toJSON (workspaceMetadata toolchainName); shellHook = '' export CARGO_HOME="$XDG_DATA_HOME/cargo" source "$TOOLCHAIN/etc/bash_completion.d/cargo" @@ -178,7 +182,6 @@ let }) toolchains; - buildBinWith = { platforms, toolchainName }: { pname , bin ? pname @@ -189,7 +192,7 @@ let inherit (toolchains.${toolchainName}) craneLib; meta = let - metadata = importJSON (craneLib.cargoMetadata commonArgs); + metadata = workspaceMetadata toolchainName; packageMetadata = findSingle (p: p.name == pname) (throw "package ${pname} not found") (throw "duplicate metadata for package ${pname}") From c0d9f06f3fb20e3179537882001cc44c0e19ae48 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 19 Jun 2026 08:57:09 +0200 Subject: [PATCH 21/29] nested job matrix --- .github/workflows/cicd.yml | 13 +------------ nix/rust/cargo.nix | 9 +++++++-- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 5037c34..7fcda04 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -75,18 +75,7 @@ jobs: - run: nix build .#checks.x86_64-linux.${TOOLCHAIN}.flatChecks.${CHECK} env: TOOLCHAIN: ${{ matrix.toolchain }} - CHECK: ${{ matrix.check }} - - # flake-check: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v5 - # - uses: cachix/install-nix-action@v31 - # - uses: cachix/cachix-action@v17 - # with: - # name: wolcomm-public - # authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - # - run: nix flake check + CHECK: ${{ matrix.check.name }} build-junos-agent: name: build-junos-agent diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 20ae97f..7396243 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -2,7 +2,7 @@ let inherit (pkgs) lib linkFarm writeText; inherit (builtins) attrNames length listToAttrs mapAttrs toJSON; - inherit (lib) concatStringsSep findSingle importJSON + inherit (lib) concatStringsSep findSingle importJSON mapAttrsToList nameValuePair optionals optionalAttrs optionalString remove; baseLib = crane.mkLib pkgs; @@ -85,7 +85,12 @@ let (name: mapRecursive (path ++ [ name ]) set.${name}) (lib.attrNames set); in lib.listToAttrs (recurse [ ] checks); - matrix = writeText "${name}-matrix.json" (toJSON (attrNames flatChecks)); + jobs = mapAttrsToList + (name: check: { + inherit name; + }) + flatChecks; + matrix = writeText "${name}-matrix.json" (toJSON jobs); in { passthru = { inherit checks matrix flatChecks; From 44040b02096cc2b9cc6bd4dd30b17e6093aab3f7 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 19 Jun 2026 09:01:15 +0200 Subject: [PATCH 22/29] update manifests --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 3ee2147..bcf6081 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1781177708, - "narHash": "sha256-kPEHVvF8LezCSBN4AXlsVK+4BsC3upoJK4wD1IjB/lo=", + "lastModified": 1781783913, + "narHash": "sha256-7cmYYYEBoubfZxKeHsTkWyR/l7LFFVeIaxtJAYs7eOU=", "owner": "rustsec", "repo": "advisory-db", - "rev": "254ee9eb7b48bdbdab5773add0cbd5f17273f4f5", + "rev": "776615bd369e17d3112d06b5647d4294f9ab952c", "type": "github" }, "original": { @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-aXRfzU2T7SoOYeaKSMfggUoErGR7MI/1zAUfy+QNk28=", + "narHash": "sha256-BaquA7f8HYgmuO+XXIBa3E5NleGvWnvg3QpEHywHCcA=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, From f439d4a9cb2a5ee32096236112bdda3b8d2d1e7a Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 19 Jun 2026 09:23:20 +0200 Subject: [PATCH 23/29] test step definition from matrix --- .github/workflows/cicd.yml | 1 + nix/rust/cargo.nix | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 7fcda04..7768719 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -76,6 +76,7 @@ jobs: env: TOOLCHAIN: ${{ matrix.toolchain }} CHECK: ${{ matrix.check.name }} + - ${{ matrix.check.postStep }} build-junos-agent: name: build-junos-agent diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 7396243..935d486 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -88,6 +88,12 @@ let jobs = mapAttrsToList (name: check: { inherit name; + postStep = { + name = "post"; + run = /* bash */ '' + echo "no-op" + ''; + }; }) flatChecks; matrix = writeText "${name}-matrix.json" (toJSON jobs); From a84f5401b7cc2d68361ba47984ff66644dad02c7 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Fri, 19 Jun 2026 09:38:28 +0200 Subject: [PATCH 24/29] pass `postStep` as embedded json --- .github/workflows/cicd.yml | 2 +- nix/rust/cargo.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 7768719..2148aed 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -76,7 +76,7 @@ jobs: env: TOOLCHAIN: ${{ matrix.toolchain }} CHECK: ${{ matrix.check.name }} - - ${{ matrix.check.postStep }} + - ${{ fromJSON(matrix.check.postStep) }} build-junos-agent: name: build-junos-agent diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 935d486..9ccf91e 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -88,7 +88,7 @@ let jobs = mapAttrsToList (name: check: { inherit name; - postStep = { + postStep = toJSON { name = "post"; run = /* bash */ '' echo "no-op" From 6b5c8dc6fcee40786167f950535db3da973cfcff Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Tue, 23 Jun 2026 15:38:20 +0200 Subject: [PATCH 25/29] flatten `postStep` run script --- .github/workflows/cicd.yml | 3 ++- nix/rust/cargo.nix | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2148aed..4dfe241 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -76,7 +76,8 @@ jobs: env: TOOLCHAIN: ${{ matrix.toolchain }} CHECK: ${{ matrix.check.name }} - - ${{ fromJSON(matrix.check.postStep) }} + - id: post-run + run: ${{ matrix.check.postStep }} build-junos-agent: name: build-junos-agent diff --git a/nix/rust/cargo.nix b/nix/rust/cargo.nix index 9ccf91e..b4e1f72 100644 --- a/nix/rust/cargo.nix +++ b/nix/rust/cargo.nix @@ -88,12 +88,9 @@ let jobs = mapAttrsToList (name: check: { inherit name; - postStep = toJSON { - name = "post"; - run = /* bash */ '' - echo "no-op" - ''; - }; + postStep = /* bash */ '' + echo "no-op" + ''; }) flatChecks; matrix = writeText "${name}-matrix.json" (toJSON jobs); From 52f823e4fe11c5f97c2faf808002f279a96fcccb Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Tue, 23 Jun 2026 15:39:58 +0200 Subject: [PATCH 26/29] update nightly manifest --- flake.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index bcf6081..d08a61c 100644 --- a/flake.lock +++ b/flake.lock @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-BaquA7f8HYgmuO+XXIBa3E5NleGvWnvg3QpEHywHCcA=", + "narHash": "sha256-nSya6bg8sXGNh5xSqac9QcupW4/SkYgZ3zbyige0BqI=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, From 7d2eaca07488a519ae10147cd9cc7a3d26c39ddf Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Wed, 8 Jul 2026 11:30:47 +0200 Subject: [PATCH 27/29] update inputs --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index d08a61c..4c23664 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1781783913, - "narHash": "sha256-7cmYYYEBoubfZxKeHsTkWyR/l7LFFVeIaxtJAYs7eOU=", + "lastModified": 1783415702, + "narHash": "sha256-bt0KVQZfj5+jizbe0zI5z+e6eefDnlQ8ISSDtZ3Re9c=", "owner": "rustsec", "repo": "advisory-db", - "rev": "776615bd369e17d3112d06b5647d4294f9ab952c", + "rev": "5e319f89424272fa0cad22463f444ab44c93df7d", "type": "github" }, "original": { @@ -102,7 +102,7 @@ "nightly-manifest": { "flake": false, "locked": { - "narHash": "sha256-nSya6bg8sXGNh5xSqac9QcupW4/SkYgZ3zbyige0BqI=", + "narHash": "sha256-pPZfCHZGXIegmTCpG2+FAjhvhs7J633cLsNn5P47gHo=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }, From a632b6bbae7ab42c674d71efcee51ffaae704cb3 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Wed, 8 Jul 2026 11:37:28 +0200 Subject: [PATCH 28/29] update stable manifest --- flake.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 4c23664..92d920f 100644 --- a/flake.lock +++ b/flake.lock @@ -160,7 +160,7 @@ "stable-manifest": { "flake": false, "locked": { - "narHash": "sha256-kCHJPWyoX76/Y5AHs7Zga+sH+imvZ14GcpiinNNMUbk=", + "narHash": "sha256-JdQ1FYXbCNPD275fmQk29p4WukVC1O8PmAIP1WpHZKU=", "type": "file", "url": "https://static.rust-lang.org/dist/channel-rust-stable.toml" }, From 4d89ec3477dd4469b2d4dcf1db82bcc541d4c116 Mon Sep 17 00:00:00 2001 From: Ben Maddison Date: Wed, 8 Jul 2026 11:46:55 +0200 Subject: [PATCH 29/29] remove workflow job dependency on legacy rust workflows --- .github/workflows/cicd.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 4dfe241..b3f0c83 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -58,6 +58,7 @@ jobs: TOOLCHAIN: ${{ matrix.toolchain }} checks: + name: checks runs-on: ubuntu-latest needs: generate-matrix strategy: @@ -81,9 +82,7 @@ jobs: build-junos-agent: name: build-junos-agent - needs: - - lint - - test + needs: checks runs-on: ubuntu-latest steps: - name: checkout