Cargo Features
[dependencies]
surf = { version = "2.3.2", default-features = false, features = ["curl-client", "h1-client", "h1-client-no-tls", "h1-client-rustls", "hyper-client", "wasm-client", "default-client", "middleware-logger", "encoding"] }
- default = curl-client, encoding, middleware-logger
-
when the default feature set is updated, verify that the
--features
flags in.github/workflows/ci.yaml
are updated accordingly - curl-client default = default-client, once_cell
-
Enables curl_client of http-client
- h1-client = async-native-tls, default-client, once_cell
-
Enables h1_client and native-tls of http-client
- h1-client-no-tls = default-client, once_cell
-
Enables h1_client of http-client
- h1-client-rustls = default-client, once_cell, rustls_crate
-
Enables h1_client and rustls of http-client
- hyper-client = default-client, once_cell
-
Enables tokio02 of async-std, hyper_client of http-client
- wasm-client = default-client, web-sys
-
Enables js of getrandom, wasm_client of http-client
- default-client curl-client h1-client? h1-client-no-tls? h1-client-rustls? hyper-client? wasm-client?
- middleware-logger default
- encoding default = encoding_rs, web-sys
-
requires web-sys for TextDecoder on wasm
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.