GitoxideLabs / gitoxide

An idiomatic, lean, fast & safe pure Rust implementation of Git
Apache License 2.0
8.91k stars 303 forks source link

Add a `tokio` feature #1565

Open Austaras opened 1 month ago

Austaras commented 1 month ago

Summary 💡

Title.

Motivation 🔦

It won't make any difference to end user, but when consumed as a rust lib, it would be great if one can use gitoxide with the more popular async runtime.

NobodyXu commented 1 month ago

Actually the blocking-reqwest feature uses reqwest which uses tokio.

And it also has an async network client feature that exposes the async API, but then there's no convenient high-level method like synchronous code have.

The underlying crate supports async/sync.

Byron commented 1 month ago

The way I understand this issue is such that wherever currently async-std is used, there should be an alternative that uses the respective tokio type. This way, those who have tokio running already can just use that, without the need to link to another runtime.