You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently Postgrest is only usable inside tokio's runtime. That's sufficient for most applications, but there are some environments that either have a different future crate, or just can't afford to use tokio (heavy binary footprint).
In my case, I'm using bevy that support only futures_lite futures. There is a way to use tokio, but it's painful and it just loses the point of using tokio in the first place (you have to manually poll it. An overkill just to use postgrest).
Describe the solution you'd like
My solution would be to create a crate feature blocking (like in reqwest), which contains the blocking module, where Postgrest uses the blocking reqwest client instead. The logic should be absolutely the same:
use postgrest::blocking::Postgrest;let pg = Postgrest::new(url);
Describe alternatives you've considered
Currently none. Just use the postgrest syntax directly with blocking reqwest or ureq.
Additional context
The feature can also be very useful not only in game development, but for simple apps in general that can afford to block the current thread.
The text was updated successfully, but these errors were encountered:
Feature request
Is your feature request related to a problem? Please describe.
Currently Postgrest is only usable inside tokio's runtime. That's sufficient for most applications, but there are some environments that either have a different future crate, or just can't afford to use tokio (heavy binary footprint).
In my case, I'm using bevy that support only
futures_lite
futures. There is a way to use tokio, but it's painful and it just loses the point of using tokio in the first place (you have to manually poll it. An overkill just to use postgrest).Describe the solution you'd like
My solution would be to create a crate feature
blocking
(like in reqwest), which contains theblocking
module, where Postgrest uses the blocking reqwest client instead. The logic should be absolutely the same:Describe alternatives you've considered
Currently none. Just use the postgrest syntax directly with blocking reqwest or ureq.
Additional context
The feature can also be very useful not only in game development, but for simple apps in general that can afford to block the current thread.
The text was updated successfully, but these errors were encountered: