chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1 @@
{"files":{".cargo_vcs_info.json":"9711ec54bd5995ce345fda157b6839835124ae1ef630412a4624473f5e2c0104","Cargo.toml":"15369321307269c2f1c05dd929003dd16372ab741c9a77f2d596c7d8425ff6a3","Cargo.toml.orig":"7000eb9dde530d3624728f8094f01ebbed34ebf029a39a8a9ac2962d8a62ed4e","src/lib.rs":"8d05218bce51a6f9c4b2e7fd591cd08f98e2f00b4cca6e072021d99d46590f5f","src/runtime.rs":"3a2c2b9fb87991ca9c373f295c67380b945bb3f6c6043e127f035b70b572130c","src/time.rs":"7d88b9dbaf789b1e85dac9e96a1a8177584aa816d82a24424f475701b9404ae0"},"package":"63aeb9d2b74f8f38befdc0c5172d5ffcf58f3d2ffcb423f3b6cdfe2c2d747b80"}

View File

@@ -0,0 +1,7 @@
{
"git": {
"sha1": "a3ae9836e27111b5e1ad15ac5c84491907d21e86",
"dirty": true
},
"path_in_vcs": "russh-util"
}

61
vendor/russh-util/Cargo.toml vendored Normal file
View File

@@ -0,0 +1,61 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
rust-version = "1.65"
name = "russh-util"
version = "0.46.0"
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Runtime abstraction utilities for russh."
homepage = "https://github.com/warp-tech/russh"
documentation = "https://docs.rs/russh-util"
readme = false
license = "Apache-2.0"
repository = "https://github.com/warp-tech/russh"
[lib]
name = "russh_util"
path = "src/lib.rs"
[dependencies.chrono]
version = "0.4.38"
[dependencies.tokio]
version = "1.17"
features = [
"sync",
"macros",
]
[dev-dependencies.futures-executor]
version = "0.3.13"
[dev-dependencies.static_assertions]
version = "1.1.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.17"
features = [
"io-util",
"rt-multi-thread",
"rt",
]
[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2"
[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4.43"

2
vendor/russh-util/src/lib.rs vendored Normal file
View File

@@ -0,0 +1,2 @@
pub mod runtime;
pub mod time;

63
vendor/russh-util/src/runtime.rs vendored Normal file
View File

@@ -0,0 +1,63 @@
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
#[derive(Debug)]
pub struct JoinError;
impl std::fmt::Display for JoinError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "JoinError")
}
}
impl std::error::Error for JoinError {}
pub struct JoinHandle<T>
where
T: Send,
{
handle: tokio::sync::oneshot::Receiver<T>,
}
#[cfg(target_arch = "wasm32")]
macro_rules! spawn_impl {
($fn:expr) => {
wasm_bindgen_futures::spawn_local($fn)
};
}
#[cfg(not(target_arch = "wasm32"))]
macro_rules! spawn_impl {
($fn:expr) => {
tokio::spawn($fn)
};
}
pub fn spawn<F, T>(future: F) -> JoinHandle<T>
where
F: Future<Output = T> + 'static + Send,
T: Send + 'static,
{
let (sender, receiver) = tokio::sync::oneshot::channel();
spawn_impl!(async {
let result = future.await;
let _ = sender.send(result);
});
JoinHandle { handle: receiver }
}
impl<T> Future for JoinHandle<T>
where
T: Send,
{
type Output = Result<T, JoinError>;
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
match Pin::new(&mut self.handle).poll(cx) {
Poll::Ready(Ok(val)) => Poll::Ready(Ok(val)),
Poll::Ready(Err(_)) => Poll::Ready(Err(JoinError)),
Poll::Pending => Poll::Pending,
}
}
}

27
vendor/russh-util/src/time.rs vendored Normal file
View File

@@ -0,0 +1,27 @@
#[cfg(not(target_arch = "wasm32"))]
pub use std::time::Instant;
#[cfg(target_arch = "wasm32")]
pub use wasm::Instant;
#[cfg(target_arch = "wasm32")]
mod wasm {
#[derive(Debug, Clone, Copy)]
pub struct Instant {
inner: chrono::DateTime<chrono::Utc>,
}
impl Instant {
pub fn now() -> Self {
Instant {
inner: chrono::Utc::now(),
}
}
pub fn duration_since(&self, earlier: Instant) -> std::time::Duration {
(self.inner - earlier.inner)
.to_std()
.expect("Duration is negative")
}
}
}

Binary file not shown.

View File

@@ -0,0 +1 @@
{"name":"russh-util","vers":"0.46.0","deps":[{"name":"chrono","req":"^0.4.38","features":[],"optional":false,"default_features":true,"target":null,"kind":"normal","registry":"https://github.com/rust-lang/crates.io-index","package":null,"public":null,"artifact":null,"bindep_target":null,"lib":false},{"name":"tokio","req":"^1.17","features":["sync","macros"],"optional":false,"default_features":true,"target":null,"kind":"normal","registry":"https://github.com/rust-lang/crates.io-index","package":null,"public":null,"artifact":null,"bindep_target":null,"lib":false},{"name":"futures-executor","req":"^0.3.13","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev","registry":"https://github.com/rust-lang/crates.io-index","package":null,"public":null,"artifact":null,"bindep_target":null,"lib":false},{"name":"static_assertions","req":"^1.1.0","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev","registry":"https://github.com/rust-lang/crates.io-index","package":null,"public":null,"artifact":null,"bindep_target":null,"lib":false},{"name":"tokio","req":"^1.17","features":["io-util","rt-multi-thread","rt"],"optional":false,"default_features":true,"target":"cfg(not(target_arch = \"wasm32\"))","kind":"normal","registry":"https://github.com/rust-lang/crates.io-index","package":null,"public":null,"artifact":null,"bindep_target":null,"lib":false},{"name":"wasm-bindgen","req":"^0.2","features":[],"optional":false,"default_features":true,"target":"cfg(target_arch = \"wasm32\")","kind":"normal","registry":"https://github.com/rust-lang/crates.io-index","package":null,"public":null,"artifact":null,"bindep_target":null,"lib":false},{"name":"wasm-bindgen-futures","req":"^0.4.43","features":[],"optional":false,"default_features":true,"target":"cfg(target_arch = \"wasm32\")","kind":"normal","registry":"https://github.com/rust-lang/crates.io-index","package":null,"public":null,"artifact":null,"bindep_target":null,"lib":false}],"features":{},"features2":null,"cksum":"50178cabf9455af4ace8f197865bc774e803fcf54802964de1a0dc72780bbfac","yanked":null,"links":null,"rust_version":null,"v":2}