-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
52 lines (47 loc) · 2.26 KB
/
Copy pathCargo.toml
File metadata and controls
52 lines (47 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
[package]
name = "et-rest-client"
description = "Rust client for ws-server's REST API. src/lib.rs regenerated; this Cargo.toml is hand-maintained."
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
[lib]
# src/lib.rs is generated by progenitor; its /** */ doc comments contain
# markdown backtick prose that Rust's doctest runner tries to compile as code.
doctest = false
[features]
default = ["tracing"]
# OTel traceparent injection runs in the progenitor pre-hook. The hook body
# is `#[cfg(feature = "tracing")]`-gated by the generator (see
# `utilities/int-gen/src/rest.rs`), so without this feature it's a no-op and
# the heavyweight OTel deps don't get pulled in — required for the browser
# WASM targets that consume this crate.
tracing = ["dep:opentelemetry", "dep:opentelemetry-http", "dep:tracing-opentelemetry"]
[dependencies]
bytes.workspace = true
futures-core.workspace = true
opentelemetry = { workspace = true, optional = true }
opentelemetry-http = { workspace = true, optional = true }
progenitor-client.workspace = true
serde.workspace = true
serde_urlencoded.workspace = true
tracing.workspace = true
tracing-opentelemetry = { workspace = true, optional = true }
# `rustls` and `stream` are native-only — WASM reqwest dispatches via the
# browser's `fetch()` and has no notion of a TLS stack.
#
# `retry-policies` + `tokio` back the generator-injected `ClientHooks::exec`
# backoff retry (see `utilities/int-gen/src/openapi.rs::inject_retry_exec`).
# Native-only: that hook is `#[cfg(not(wasm32))]`, and `tokio::time::sleep` /
# `SystemTime` don't work under `wasm32-unknown-unknown`.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
reqwest = { workspace = true, features = ["json", "query", "rustls", "stream"] }
retry-policies.workspace = true
tokio = { workspace = true, features = ["time"] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
reqwest = { workspace = true, features = ["json"] }
# Used by the generator-injected Client::new fallback: an empty `baseurl`
# resolves to `window.location.origin` so browser modules can write
# `Client::new("")` and have it match the page origin (and our embedded
# Deno runtime's stubbed `globalThis.location`).
web-sys = { workspace = true, features = ["Location", "Window"] }