Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
76 lines (72 loc) · 3.68 KB
/
Copy pathCargo.toml
File metadata and controls
76 lines (72 loc) · 3.68 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[package]
name = "hotdata"
version = "0.20.0"
authors = ["developers@hotdata.dev"]
description = "Powerful data platform API for datasets, queries, and analytics."
license = "MIT"
edition = "2021"
readme = "README.md"
repository = "https://github.com/hotdata-dev/sdk-rust"
homepage = "https://www.hotdata.dev"
documentation = "https://docs.rs/hotdata"
keywords = ["hotdata", "sdk", "api-client", "arrow", "async"]
categories = ["api-bindings", "asynchronous", "database"]
[dependencies]
serde = { version = "^1.0", features = ["derive"] }
serde_with = { version = "^3.21", default-features = false, features = ["base64", "std", "macros"] }
# `raw_value` carries each result-row cell as its JSON text (see
# src/models/json_cell.rs), so a decimal wider than an f64 keeps every digit
# instead of being rounded into a `Value`'s number. Deliberately NOT
# `arbitrary_precision`: that feature is crate-wide and changes how every
# `serde_json::Number` serializes, which corrupts non-JSON formats for
# downstreams. `raw_value` changes nothing for code that does not name
# `RawValue`.
serde_json = { version = "^1.0", features = ["raw_value"] }
serde_repr = "^0.1"
url = "^2.5"
tokio = { version = "^1.46.0", features = ["fs", "sync", "rt", "macros", "time"] }
tokio-util = { version = "^0.7", features = ["codec"] }
# `gzip` is what makes reqwest negotiate compressed responses: the feature gates
# both the automatic `Accept-Encoding: gzip` request header and the transparent
# decode of the reply. Without it (this crate sets `default-features = false`,
# so nothing enables it implicitly) every request asked for full-size bytes,
# which is costly on exactly the largest responses — query result cells and
# paginated listings. Enabling the feature is sufficient: reqwest's
# `ClientBuilder` defaults auto-gzip on whenever it is compiled in, so both
# client construction sites pick it up with no code change. Deliberately gzip
# only, not `brotli`/`zstd`: gzip is universally supported and adds no codec
# the tree does not already carry, and the ratio gained by the others does not
# pay for the extra dependency surface a library forces on every downstream.
reqwest = { version = "^0.13", default-features = false, features = ["json", "multipart", "stream", "query", "form", "gzip"] }
async-trait = "^0.1"
bytes = "^1.12.1"
futures-core = "^0.3"
log = "^0.4"
arrow-ipc = { version = "59", optional = true }
# Only for `Buffer`, which `arrow-ipc`'s push decoder names in its public
# signature and does not re-export. Backs the zero-copy handoff from a reqwest
# body chunk (`bytes::Bytes`) to `StreamDecoder::decode`.
arrow-buffer = { version = "59", optional = true }
arrow-array = { version = "59", optional = true }
arrow-schema = { version = "59", optional = true }
[features]
default = ["native-tls"]
native-tls = ["reqwest/native-tls"]
rustls = ["reqwest/rustls"]
arrow = ["dep:arrow-ipc", "dep:arrow-array", "dep:arrow-schema", "dep:arrow-buffer"]
[dev-dependencies]
tokio = { version = "^1.46.0", features = ["rt-multi-thread", "macros", "time"] }
futures = "^0.3"
wiremock = "0.6"
uuid = { version = "1", features = ["v4"] }
# Lets the integration harness build a reqwest client with a bounded connect
# timeout (see tests/common/mod.rs). default-features = false mirrors the lib;
# the TLS backend comes from the crate's own `native-tls`/`rustls` features via
# Cargo feature unification.
reqwest = { version = "^0.13", default-features = false }
# Builds a genuinely gzip-encoded response body in tests/response_compression.rs,
# so the decode is proven end to end rather than inferred from a request header.
# Not a new link in the tree: reqwest's own gzip support pulls flate2 in already.
flate2 = "^1"
[package.metadata.docs.rs]
all-features = true