-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tokio-less APIs? #6
Comments
Thank you! Our usecase is very much async focused so all the command stuff is very async centric and non async ways are currently not easily exposed. It should be possible to define a runix/crates/runix/src/command_line/mod.rs Lines 216 to 255 in 3112401
If we go down that path both async and sync impls should share as much code as possible, so they do not become a maintenance burden |
Would you think it would make sense to gate sync APIs behind a feature and
make it non default to reduce more the maintenance burden?
Le jeu. 9 mars 2023 à 17:57, Yannik Sander ***@***.***> a
écrit :
… Thank you!
Our usecase is very much async focused so all the command stuff is very
async centric and non async ways are currently not easily exposed.
Though Async stops after the Run trait and its impls.
It should be possible to define a RunSync trait and corresponding impl of
a sync CommandLine backend, i.e. a sync version of
https://github.com/flox/runix/blob/3112401dc888111b7a074cbf4a52ebb2cd51e45b/crates/runix/src/command_line/mod.rs#L216-L255
If we go down that path both async and sync impls should share as much
code as possible, so they do not become a maintenance burden
—
Reply to this email directly, view it on GitHub
<#6 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACMZRE7DBANJEIGZTWVTBDW3IDXRANCNFSM6AAAAAAVVBFHIM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Putting it behind feature flags in either direction would make sense. runix/crates/runix/src/command_line/mod.rs Lines 245 to 254 in 3112401
n.b. its able to "downgrade" a tokio command to an std command, perhaps its possible to go the other way around as well. than it should be a fairly minimal difference. |
Hi there, thank you for the amazing package :)
I am trying to use it in a project where I would like to have a std::process::Command-like API without any tokio/async/await stuff, do you think it is possible? I can also send a PR if you tell me what would you accept as a change regarding this.
Thank you!
The text was updated successfully, but these errors were encountered: