On 09/07/2024 02:02, Matthias Geiger wrote: > On 08.07.24 18:45, Jonas Smedegaard wrote: >> Quoting Matthias Geiger (2024-07-07 11:21:07) >>> On 07.07.24 10:10, Jonas Smedegaard wrote: >>> [...] >>>> [...] >>> isahc requires sluice only for some pipe functionality in two files. >>> Since patching sluice proves to be hard I'd >>> >>> opt to patch isahc to use something like stdio::piped() rather than >>> sluice::pipe. Then I can file a RM request for sluice since it's not >>> used elsewhere and we can finish this transition. >> Makes great sense. > > I attached my wip for using os_pipe instead of sluice. Still has four errors > atm; I'd appreciate some knowledgable people looking into it (CC'd ncts). I do > not have any more time atm to sink into this; will pick it up later unless > someone beats me to it. > > best, > > werdahias
The errors came from the fact that os_pipe is sync, while isahc is async. I've implemented a simple wrapper for the pipe reader & writer; rather long, thus put in a fork: https://salsa.debian.org/ncts/rust-isahc/-/commits/replace-sluice. Note that os_pipe can fail, thus two `todo!()`s. OTOH, sluice returns directly the pipe, without wrapping in Result, so I think there is space for improvement. -- Sdrager, Blair Noctis
OpenPGP_0xC21D9AD423A39727.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature