async-h1 icon indicating copy to clipboard operation
async-h1 copied to clipboard

Please don't pull in wasm dependencies on non-wasm platforms

Open joshtriplett opened this issue 5 years ago • 5 comments

async-h1 depends on async-std with the unstable feature; that in turn pulls in wasm dependencies via futures-timer then gloo-timers. Please consider adjusting the feature flag dependencies to avoid pulling gloo-timers and its pile of wasm-specific dependencies on non-wasm platforms.

joshtriplett avatar Aug 26 '20 06:08 joshtriplett

https://github.com/async-rs/async-std/issues/823 — I believe this is a cargo bug. Proposed async-std solution here: https://github.com/async-rs/async-std/pull/864. This also breaks no-std for async-std, as far as I can tell. I personally believe this issue is fairly important

jbr avatar Aug 26 '20 14:08 jbr

Closing this issue because there's nothing we can do to resolve it here or in the other http-rs crates that have this problem, but please add your support to async-rs/async-std#823

jbr avatar Aug 26 '20 19:08 jbr

Does async-h1 need the "unstable" feature of async-std? Could it have a finer-grained dependency?

joshtriplett avatar Aug 27 '20 01:08 joshtriplett

That's a great point. Async-h1 itself does not

jbr avatar Aug 27 '20 02:08 jbr

Unfortunately, this does not really fix the problem — async-h1 depends on http-types, which uses async_std::sync::channel, which is gated behind unstable and async-std does not have a more granular set of features to enable: https://github.com/async-rs/async-std/blob/master/src/sync/channel.rs#L61

jbr avatar Aug 27 '20 02:08 jbr