Cargo Features
bitcoin_de has no features set by default.
[dependencies]
bitcoin_de = { version = "0.1.1", features = ["cmdline", "backend", "wasm", "reqwest-native", "reqwest-wasm"] }
- cmdline = clap, dotenv, reqwest-native
-
Define our features
Default feature enables CLI requirementsEnables rt-multi-thread of tokio
Async Runtimes and WASM-specific crates (enabled by features, made optional)
Minimal features for running async, time for SystemTimeRequired by the bitcoin_de_trading_api_client binary
- backend = axum, dotenv, futures-util, reqwest-native, tokio
-
Actix backend requires Actix Web and Tokio for runtime
Enables rt-multi-thread of tokio
Required by the bitcoin_de_backend binary
- wasm = js-sys, reqwest-wasm, wasm-bindgen, wasm-bindgen-futures, web-sys
-
WASM requires WASM-specific crates and WASM reqwest features
- reqwest-native backend? cmdline?
-
Internal features to conditionally enable reqwest features based on our features These are not meant to be enabled directly by the user For native targets (CLI, Actix) - uses rustls and json
Enables json and rustls-tls of reqwest
reqwest: Base version, features enabled conditionally below
- reqwest-wasm wasm?
-
For WASM target - uses wasm-bindgen fetch and json
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.
- clap cmdline?
-
Enables clap
For parsing command line arguments
- tokio backend? cmdline?
- wasm-bindgen-futures wasm?
-
Enables wasm-bindgen-futures
Needed to run async code in WASM
- wasm-bindgen wasm?
-
Enables wasm-bindgen
For JS interop in WASM
- js-sys wasm?
-
Enables js-sys
For interacting with JS types in WASM
- web-sys wasm?
-
Enables web-sys
For browser APIs in WASM
- axum backend?
-
Enables axum
Backend framework (using Axum) - optional = true and included in 'backend' feature Added axum dependency
- dotenv backend? cmdline?
-
Enables dotenv
Make dotenv optional as it's primarily for CLI configuration
- futures-util backend?
-
Enables futures-util
Add futures-util as an optional dependency, needed by the backend Added futures-util