http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.45k stars 119 forks source link

remove wasm_bindgen feature (retain wasm-client, which is identical in practice) #235

Closed jbr closed 3 years ago

jbr commented 3 years ago

As mentioned in the review of #233, I think the wasm_bindgen feature was not the right path for surf, as a library crate. It is only added by wasm_pack to the top level crate, which isn't relevant to a library crate, so users will still need to explicitly specify a wasm feature. As long as we require specifying a wasm feature, we should: a) only have one wasm flag, instead of two identical flags, and b) use a flag that is descriptive (wasm-client matches with h1-client and curl-client)

Fishrock123 commented 3 years ago

(Maybe this is a bug in wasm-pack though - shouldn't it pass it to all crates? (if that is possible?))

jbr commented 3 years ago

I don't think there's a way to pass features into nested / transitive deps. That would be cool, but it doesn't seem to be happening (or we wouldn't need to enable any features for the tests to pass in the integration test PR)

Fishrock123 commented 3 years ago

I honestly don't know, I wasn't sure if wasm-pack did some kind of special underhand magic to begin with.