-
Notifications
You must be signed in to change notification settings - Fork 2
/
Cargo.toml
84 lines (74 loc) · 3.11 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
82
83
84
[package]
name = "serde-this-or-that"
version = "0.4.2"
authors = ["Ritvik Nag <rv.kvetch@gmail.com>"]
description = "Custom deserialization for fields that can be specified as multiple types."
documentation = "https://docs.rs/serde-this-or-that"
repository = "https://github.com/rnag/serde-this-or-that"
readme = "README.md"
keywords = ["serde",
# I would have liked to add the below keyword, but of course
# crates.io has a limit of 5 keywords, so well.. that's that. :\
# "utilities",
# And now surprisingly, I found this keyword to be super useful!
# I'm actually partially shocked that crates.io doesn't use the
# crate name to automagically satisfy user search requests.
"this-or-that",
# Of course, the rest that follow are also pretty solid too.
"deserialization",
"visitor",
"multiple-type"]
categories = ["encoding"]
license = "MIT"
edition = "2021"
# Exclude the `examples/` and `benches/` folders when publishing the crate,
# as these can always be found on the project repo on GitHub.
# See also: https://users.rust-lang.org/t/what-to-include-when-publishing-a-crate/51992
exclude = [".github/", ".gitignore", "benches/", "examples/"]
# See here for more info: https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html
[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# No `derive` features necessary, just the stock `serde` by itself :-)
serde = "1.0.136"
[dev-dependencies]
# We'll need the `derive` feature for examples and tests.
serde = { version = "^1", features = ["derive"] }
# And don't forget `serde-json`.
serde_json = "^1"
# This one's for running benchmarks, with `cargo bench`.
criterion = { version = "0.3.5", features = ["html_reports"] }
# serde_with: used for a baseline comparison in the benchmarks.
serde_with = "1.12.1"
# Here we have our logging utilities, mainly for use in examples.
log = "^0.4"
sensible-env-logger = "0.2.0"
# version_sync: to ensure versions in `Cargo.toml` and `README.md` are in sync
version-sync = "0.9.4"
# cargo-bump: to bump package version and tag a commit at the same time.
# actually, the docs recommend installing this globally:
# $ git clone https://github.com/rnag/cargo-bump && cd cargo-bump && cargo install --path . && cd .. && rm -rf cargo-bump
### FEATURES #################################################################
[features]
# Enable nothing by default.
default = []
# The `derive` feature can be enabled when adding the dependency, and then
# it can be used like, e.g.:
# use serde_this_or_that::Deserialize;
# Note, this requires that a project's `Cargo.toml` be updated as follows:
# serde-this-or-that = { version = "*", features = ["derive"] }
derive = ["serde/derive"]
[[bench]]
name = "as_u64"
harness = false
path = "benches/as_u64.rs"
[[bench]]
name = "as_bool"
harness = false
path = "benches/as_bool.rs"
[[bench]]
name = "serde_with"
harness = false
path = "benches/serde_with.rs"