Repository navigation
feat(rsync_io): async SshTransport::execute_remote_rsync behind --features async-ssh (#1796) - #4273
Merged
Merged
Conversation
Introduce `AsyncSshTransport::execute_remote_rsync` as the tokio-backed counterpart to `SshConnection::connect_with_config`. Argv composition is delegated through the existing `SshCommand` builder so the sync and async paths render byte-identical SSH command lines for any given (remote, args, config) triple. The new module is gated behind `--features async-ssh`, opt-in only. Default builds remain on the synchronous `std::process` transport with no tokio dependency. The downstream `ChannelReader`/`ChannelWriter` adapters that bridge these halves into the multiplex framing layer are tracked separately as task #1797.
oferchen
force-pushed
the
feat/ssh-execute-remote-rsync-async-1796
branch
from
May 17, 2026 20:47
6790ee5 to
7886b4c
Compare
oferchen
added a commit
that referenced
this pull request
May 17, 2026
…1805) (#4290) Adds an async-ssh feature on the core crate that pulls in the tokio-backed `rsync_io::ssh::AsyncSshTransport` (PR #4273) and bridges it into the existing synchronous client transfer orchestration. A new `async_ssh_transport` module spawns the async transport, copies bytes between its `AsyncRead`/`AsyncWrite` halves and the sync handshake + server-framing layer via the `ChannelReader`/`ChannelWriter` adapters, and runs the sync server flow under `tokio::task::spawn_blocking`. The client driver picks the async path when the `OC_RSYNC_ASYNC_SSH=1` env var is set; the CLI flag is deferred to #1806. Progress observation and remote-to-remote proxy transfers remain on the sync path for now.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
… (#4273) Introduce `AsyncSshTransport::execute_remote_rsync` as the tokio-backed counterpart to `SshConnection::connect_with_config`. Argv composition is delegated through the existing `SshCommand` builder so the sync and async paths render byte-identical SSH command lines for any given (remote, args, config) triple. The new module is gated behind `--features async-ssh`, opt-in only. Default builds remain on the synchronous `std::process` transport with no tokio dependency. The downstream `ChannelReader`/`ChannelWriter` adapters that bridge these halves into the multiplex framing layer are tracked separately as task #1797.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…1805) (#4290) Adds an async-ssh feature on the core crate that pulls in the tokio-backed `rsync_io::ssh::AsyncSshTransport` (PR #4273) and bridges it into the existing synchronous client transfer orchestration. A new `async_ssh_transport` module spawns the async transport, copies bytes between its `AsyncRead`/`AsyncWrite` halves and the sync handshake + server-framing layer via the `ChannelReader`/`ChannelWriter` adapters, and runs the sync server flow under `tokio::task::spawn_blocking`. The client driver picks the async path when the `OC_RSYNC_ASYNC_SSH=1` env var is set; the CLI flag is deferred to #1806. Progress observation and remote-to-remote proxy transfers remain on the sync path for now.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
… (#4273) Introduce `AsyncSshTransport::execute_remote_rsync` as the tokio-backed counterpart to `SshConnection::connect_with_config`. Argv composition is delegated through the existing `SshCommand` builder so the sync and async paths render byte-identical SSH command lines for any given (remote, args, config) triple. The new module is gated behind `--features async-ssh`, opt-in only. Default builds remain on the synchronous `std::process` transport with no tokio dependency. The downstream `ChannelReader`/`ChannelWriter` adapters that bridge these halves into the multiplex framing layer are tracked separately as task #1797.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…1805) (#4290) Adds an async-ssh feature on the core crate that pulls in the tokio-backed `rsync_io::ssh::AsyncSshTransport` (PR #4273) and bridges it into the existing synchronous client transfer orchestration. A new `async_ssh_transport` module spawns the async transport, copies bytes between its `AsyncRead`/`AsyncWrite` halves and the sync handshake + server-framing layer via the `ChannelReader`/`ChannelWriter` adapters, and runs the sync server flow under `tokio::task::spawn_blocking`. The client driver picks the async path when the `OC_RSYNC_ASYNC_SSH=1` env var is set; the CLI flag is deferred to #1806. Progress observation and remote-to-remote proxy transfers remain on the sync path for now.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
… (#4273) Introduce `AsyncSshTransport::execute_remote_rsync` as the tokio-backed counterpart to `SshConnection::connect_with_config`. Argv composition is delegated through the existing `SshCommand` builder so the sync and async paths render byte-identical SSH command lines for any given (remote, args, config) triple. The new module is gated behind `--features async-ssh`, opt-in only. Default builds remain on the synchronous `std::process` transport with no tokio dependency. The downstream `ChannelReader`/`ChannelWriter` adapters that bridge these halves into the multiplex framing layer are tracked separately as task #1797.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…1805) (#4290) Adds an async-ssh feature on the core crate that pulls in the tokio-backed `rsync_io::ssh::AsyncSshTransport` (PR #4273) and bridges it into the existing synchronous client transfer orchestration. A new `async_ssh_transport` module spawns the async transport, copies bytes between its `AsyncRead`/`AsyncWrite` halves and the sync handshake + server-framing layer via the `ChannelReader`/`ChannelWriter` adapters, and runs the sync server flow under `tokio::task::spawn_blocking`. The client driver picks the async path when the `OC_RSYNC_ASYNC_SSH=1` env var is set; the CLI flag is deferred to #1806. Progress observation and remote-to-remote proxy transfers remain on the sync path for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AsyncSshTransport::execute_remote_rsyncas the tokio-backed counterpart toSshConnection::connect_with_config(added by PR feat(rsync_io): SshConnection connect_with_config (timeout + keepalive) (#1795) #4266). The async path reuses the existingSshCommandbuilder so argv composition stays byte-identical between sync and async transports for any given(remote, args, config)triple.--features async-sshcargo feature gates the entire async module. Default builds remain on the synchronousstd::processtransport with no tokio dependency in the SSH path.AsyncSshTransport::splitreturns(impl AsyncRead, impl AsyncWrite)halves backed bytokio::process::ChildStdout/ChildStdin.wait()reaps the child cleanly; the underlyingChildis constructed withkill_on_drop(true)so accidental early drop never leaks zombies.Files
crates/rsync_io/Cargo.toml- declareasync-ssh = [\"dep:tokio\"]feature.crates/rsync_io/src/ssh/async_transport.rs- new module (gated#[cfg(feature = \"async-ssh\")]).crates/rsync_io/src/ssh/mod.rs- wire the new module and re-exportAsyncSshTransport.crates/rsync_io/src/ssh/builder.rs- promotecommand_partstopub(super)so the async module can compose the same argv asSshCommand::spawn.crates/rsync_io/src/ssh/connect.rs- refresh the doc references to point at the now-existing async entry point.Test plan
cargo fmt --allclean.cargo nextest run -p rsync_io --features async-ssh -E 'test(async_transport)'on Linux/macOS.OC_RSYNC_SSH_NET=1against an unroutable host confirms the watchdog-equivalent ConnectTimeout path returns a non-zero exit status within a bounded window.