Comments (8)
Hey folks, I think russh
supports a pure rust RSA now after #273
from gitoxide.
I just noticed that russh 0.44.0 has been released today.
from gitoxide.
Thanks @joshtriplett for pointing that out - the issue has been updated for correctness, and I agree about the choice, particularly if it's true that libssh
doesn't have Rust bindings yet.
so that cargo can always use libssh2 as dylib, while other who want to avoid dynamic dep on external C lib can either use external ssh cmd or use russh?
There could definitely be multiple implementations, even though I don't know how much effort it is to integrate them correctly (usually, how much configuration git
applies or libgit2
allows to pass so gitoxide
would have to match it for Cargo-compatibility).
It was always my thought that the current ssh
transport (based on the ssh
program) can remain as basis that is the default on linux (as per the gitoxide.ssh.transport
configuration or something like that), and is changed to a built-in implementation in Windows by default while still allowing the user to change it to a built-in variant provided it was compiled in.
from gitoxide.
even though I don't know how much effort it is to integrate them correctly
I think the libssh2 is definitely the easier one to implement given that cargo also uses it.
russh might be missing some configuration/support for some ciphers, though I think it would still be great to add support for it, I'm hoping for a mature ssh implementation in (pure) Rust.
It was always my thought that the current
ssh
transport (based on thessh
program) can remain as basis that is the default on linux (as per thegitoxide.ssh.transport
configuration or something like that), and is changed to a built-in implementation in Windows by default while still allowing the user to change it to a built-in variant provided it was compiled in.
I agree, though AFAIK Windows also provides ssh from a certain windows 10 version.
I would definitely want them to be gated behind feature flags since for cargo-binstall I might choose to use external ssh cmd only.
from gitoxide.
That's good news! it's time to start adopting russh in gitoxide once 0.44 comes out.
from gitoxide.
@Byron libssh2 is what libgit2 uses, so I'd expect it to be sufficiently mature.
ssh2 appears to just be bindings to libssh2.
So it seems like the choice is between libssh2 (mature and used elsewhere) or russh (pure Rust).
from gitoxide.
So it seems like the choice is between libssh2 (mature and used elsewhere) or russh (pure Rust).
Maybe gitoxide can add new features for:
- using the external ssh cmd
- using libssh2 (and linked statically?)
- using russh
so that cargo can always use libssh2 as dylib, while other who want to avoid dynamic dep on external C lib can either use external ssh cmd or use russh?
from gitoxide.
russh currently requires openssl for RSA key support, which is a bit unfortunate since it takes away ability to use pure-rust alternatives such as ring or rust-crypto.
On the plus side, there's async-ssh2-tokio
, a high level wrapper for russh, providing an async API compatible with tokio.
BTW, one thing I always desire is the support of async in high-level API, so that:
- I can easily cancel a task without using an
AtomicBool
for cancellation - can reuse my existing
reqwest::Client
, which contains a conn pool, and thetokio
runtime - easier to use in async functions, so I don't have to use
tokio::task::spawn_blocking
ortokio::task::block_in_place
when using gix
I understand why it is structured as is, because using async can be painful, its future size returned might be huge and IIRC compiler can't return huge future without copying yet (there's some missed optimization opportunities) and async-trait is still not supported very well, plus using async would immediately cause all high-level API to switch to async.
And most of the operation is synchronous for now (filesystem operations) and it's only fetching that uses network operations.
Though in the future - with the io-uring being adopted by runtime, it would also help reducing I/O for gitoxide, especially if the repository is large.
Tokio is already working on it in crate tokio-uring
and they might eventually use it as a backend in tokio
tokio-rs/tokio#2411
from gitoxide.
Related Issues (20)
- Panic when parsing `HEAD:README` in a repo with invalid HEAD. HOT 2
- gitx-credentials fails to build HOT 4
- copy detection differs from git weirdly HOT 12
- progress.rs misleadingly claims "we target 32bit systems only" HOT 6
- CVE-2024-43785: gitoxide-core does not neutralize special characters for terminals HOT 10
- gix-object v0.44.0 fail to compile HOT 2
- gitoxide is still less lenient than git when parsing signatures, in particular in tags
- gix clone fails on https://git.zx2c4.com/sha256-oid-test HOT 1
- Oxidize `git-cliff` HOT 2
- Unable to fetch with only extra_refspecs HOT 1
- Add a `tokio` feature HOT 2
- None of the commands work HOT 6
- An old value of `MSYS` with unpaired surrogates is silently replaced for fixtures
- `jj_realistic_needs_to_be_more_clever` failure is not limited to CI HOT 2
- Streaming Blob Contents HOT 3
- Build error HOT 5
- gix fails with 7 hexadecimal character hash sizes HOT 6
- `gix::Repository` - make freelist controllable HOT 1
- packed::iter::performance on riscv64 has PermanentlyLocked failure running fixture HOT 3
- "Tests pass" blocks PRs that don't need tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitoxide.