treewide: Migrate to russh#10
Conversation
russh doesn't have the libsodium compilation issues on Windows that ssh2 - migrate to it. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
andersson
left a comment
There was a problem hiding this comment.
This does solve my problem of the current implementation being an async API ontop of sync operations - which obviously didn't do what I expected.
I think the API can be made a bit more ergonomic, but that can be done as a follow up.
| let mut sess = ssh_connect(args.farm, args.port, args.user).await?; | ||
| sess.set_blocking(true); | ||
| let mut chan = ssh_get_chan(&mut sess, CDBA_SERVER_BIN_NAME).await?; | ||
| let chan = Arc::new(Mutex::new( |
There was a problem hiding this comment.
The only reason I can see for this being an Arc<Mutex<Channel>> and not just a Channel is because ssh::into_streams() below takes a Arc<Mutex<>>, presumably so that one could share the chan with the close at the async thread?
I think it would be cleaner if sk8brd provided an interface that abstracts away the ssh_connect() and just returns the three streams.
There was a problem hiding this comment.
I'm merging this as-is, we can make incremental improvements
russh doesn't have the libsodium compilation issues on Windows that ssh2 - migrate to it.