-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
76 lines (63 loc) · 3.13 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
[package]
name = "axum-codec"
version = "0.0.17"
edition = "2021"
description = "A multi-codec extractor and response writer for Axum"
license = "MIT OR Apache-2.0"
authors = ["Matthew Polak <contact@matteopolak.com>"]
repository = "https://github.com/matteopolak/axum-codec"
[package.metadata.docs.rs]
all-features = true
[workspace]
members = ["macros", ".", "examples/*"]
[dependencies]
aide = { version = "0.13", optional = true, default-features = false, features = ["axum"] }
axum = { version = "0.7", default-features = false }
axum-codec-macros = { path = "macros", version = "0.0.12", default-features = false }
bincode = { version = "2.0.0-rc.3", default-features = false, features = ["std"], optional = true }
# 0.6.3 added the #[bitcode(crate = "...")] option
bitcode = { version = "0.6.3", default-features = false, features = ["std"], optional = true }
bytes = "1"
ciborium = { version = "0.2", optional = true }
mime = "0.3"
rmp-serde = { version= "1", optional = true }
schemars = { version = "0.8", optional = true, default-features = false }
serde = { version = "1", optional = true, default-features = false }
serde_json = { version = "1", optional = true }
serde_urlencoded = { version = "0.7", optional = true }
serde_yaml = { version = "0.9", optional = true }
thiserror = "1"
toml = { version = "0.8", optional = true }
validator = { version = "0.19", optional = true }
[dev-dependencies]
axum = "0.7"
serde = { version = "1", features = ["derive", "rc"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
# cannot run `BorrowCodec` tests with `bitcode` since it doesn't support `Cow` (yet)
axum-codec = { path = ".", features = ["json", "bincode", "msgpack", "toml", "yaml", "macros", "form"] }
bitcode = "0.6.3"
[features]
default = ["json", "macros", "pretty-errors"]
# Enables all codecs
full-codecs = ["bincode", "bitcode", "json", "msgpack", "toml", "yaml", "form"]
macros = ["schemars?/derive", "bincode?/derive", "bitcode?/derive", "serde?/derive", "validator?/derive", "axum-codec-macros/debug"]
# Enables support for {get,put,..}_with and relevant chaning methods
# to add documentation to routes
aide = ["dep:aide", "dep:schemars", "axum-codec-macros/aide", "axum/json", "axum/form", "axum/original-uri", "axum/query", "axum/tokio", "axum/matched-path"]
# Enables support for `validator`, adds an additional `validator::Validate` bound to `T` in `Codec<T>`
validator = ["dep:validator", "axum-codec-macros/validator"]
# Enables more verbose (and expensive) error handling machinery, but significantly
# improves the quality of error messages for consumers of the API.
pretty-errors = ["macros"]
form = ["dep:serde_urlencoded", "axum/form"]
bincode = ["dep:bincode", "axum-codec-macros/bincode"]
bitcode = ["dep:bitcode", "axum-codec-macros/bitcode"]
# cbor = ["dep:ciborium", "serde"]
json = ["dep:serde_json", "serde"]
msgpack = ["dep:rmp-serde", "serde"]
toml = ["dep:toml", "serde"]
yaml = ["dep:serde_yaml", "serde"]
# Should not be manually enabled, but will not cause any issues if it is.
serde = ["dep:serde", "axum-codec-macros/serde"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("cbor"))'] }