Skip to content

Commit

Permalink
Crate: feature flag the wasm client.
Browse files Browse the repository at this point in the history
This is a tad unfortunate but should get around cargo pulling in wasm dependencies when not building for wasm.
  • Loading branch information
Fishrock123 committed Sep 8, 2020
1 parent c0362fc commit bc098cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ edition = "2018"
# when the default feature set is updated, verify that the `--features` flags in
# `.github/workflows/ci.yaml` are updated accordingly
default = ["h1-client", "middleware-logger", "encoding"]
h1-client = ["wasm-client", "http-client/h1_client"]
h1-client = ["http-client/h1_client"]
native-client = ["curl-client", "wasm-client", "http-client/native_client"]
curl-client = ["http-client/curl_client"]
wasm-client = ["http-client/wasm_client"]
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
//!
//! # Features
//! The following features are available.
//! - __`h1-client` (default):__ use `async-h1` on the server and `window.fetch` in the browser.
//! - __`native-client`:__ use `curl` on the server and `window.fetch` in the browser.
//! - __`h1-client` (default):__ use `async-h1` (non-wasm).
//! - __`native-client`:__ use `curl-client` on the server and `window.fetch` in the browser.
//! - __`middleware-logger` (default):__ enables logging requests and responses using a middleware.
//! - __`curl-client`:__ use `curl` (through `isahc`) as the HTTP backend.
//! - __`wasm-client`:__ use `window.fetch` as the HTTP backend.
Expand Down

0 comments on commit bc098cd

Please sign in to comment.