GitoxideLabs / gitoxide

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

Add a `tokio` feature #1565

Open Austaras opened 3 months ago

Austaras commented 3 months 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 3 months 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 3 months 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.