-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCargo.toml
81 lines (73 loc) · 2.8 KB
/
Cargo.toml
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
77
78
79
80
81
[package]
rust-version = "1.60"
edition = "2021"
name = "threescalers"
description = "3scale API client library for Rust"
version = "0.8.0"
authors = ["Alejandro Martinez Ruiz <alex@flawedcode.org>", "David Ortiz Lopez <z.david.ortiz@gmail.com>"]
license = "Apache-2.0"
repository = "https://github.com/3scale-rs/threescalers"
readme = "README.md"
keywords = ["3scale", "api-management", "api", "apisonator"]
categories = ["api-bindings"]
exclude = [
".gitignore",
"bors.toml",
".mailmap",
"/ci/**",
"/.github/**",
]
[badges]
codecov = { repository = "3scale-rs/threescalers" }
maintenance = { status = "actively-developed" }
[features]
default = ["std", "xml-response", "rest-mappings"]
# Use std library
std = ["no-std-compat/std", "anyhow/std", "regex?/std", "serde?/std", "chrono?/std"]
# Add in conversions for http's crate types
http-types = ["dep:http_types"]
# Add in conversions for reqwest's crate types
reqwest-async = ["dep:reqwest", "http-types"]
reqwest-sync = ["dep:reqwest", "reqwest?/blocking", "http-types"]
#reqwest-sync = ["dep:reqwest", "http-types"]
reqwest-all = ["reqwest-async", "reqwest-sync"]
# Add in conversions for curl's crate types
curl-easy = ["dep:curl"]
curl-easy2 = ["dep:curl"]
curl-all = ["curl-easy", "curl-easy2"]
# Include all supported clients types
all-types = ["http-types", "reqwest-all", "curl-all"]
# Response parsing
xml-response = ["dep:serde-xml-rs", "dep:serde", "dep:chrono"]
# HTTP mapping rules
rest-mappings = ["dep:regex", "dep:lazy_static"]
rest-mappings-serde = ["dep:serde"]
serde = ["dep:serde", "rest-mappings-serde"]
[dependencies]
percent-encoding = "^2"
http_types = { version = "^0.2", package = "http", optional = true }
reqwest = { version = ">= 0.10, < 0.12", optional = true }
curl = { version = "^0.4", optional = true }
serde = { version = "^1", optional = true, default-features = false, features = ["alloc", "derive"] }
serde-xml-rs = { version = "^0.6", optional = true }
chrono = { version = "^0.4", optional = true, default-features = false }
no-std-compat = { version = "^0.4", features = ["alloc"] }
anyhow = { version = "^1", default-features = false }
regex = { version = "^1", optional = true, default-features = false, features = ["perf"] }
# lazy_static has a "negative" no_std flag rather than an additive "std" flag :/
# We'll now recommend users that want no_std to enable the "lazy_static/spin_no_std" feature,
# since enabling it unconditionally here forces everyone, including std users, to use spinlocks.
lazy_static = { version = "^1", optional = true }
[[example]]
name = "reqwest-report"
required-features = ["reqwest-sync"]
[[example]]
name = "curl-easy-report"
required-features = ["curl-easy"]
[[example]]
name = "curl-easy2-report"
required-features = ["curl-easy2"]
[dev-dependencies]
serde_json = "^1.0"
itertools = "^0.10"
rand = "^0.8"