1[package]
2name = "serde"
3version = "1.0.197"
4authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
5build = "build.rs"
6categories = ["encoding", "no-std", "no-std::no-alloc"]
7description = "A generic serialization/deserialization framework"
8documentation = "https://docs.rs/serde"
9edition = "2018"
10homepage = "https://serde.rs"
11keywords = ["serde", "serialization", "no_std"]
12license = "MIT OR Apache-2.0"
13readme = "crates-io.md"
14repository = "https://github.com/serde-rs/serde"
15rust-version = "1.31"
16
17[dependencies]
18serde_derive = { version = "1", optional = true, path = "../serde_derive" }
19
20[dev-dependencies]
21serde_derive = { version = "1", path = "../serde_derive" }
22
23[lib]
24doc-scrape-examples = false
25
26[package.metadata.playground]
27features = ["derive", "rc"]
28
29[package.metadata.docs.rs]
30features = ["derive", "rc", "unstable"]
31targets = ["x86_64-unknown-linux-gnu"]
32rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]
33
34# This cfg cannot be enabled, but it still forces Cargo to keep serde_derive's
35# version in lockstep with serde's, even if someone depends on the two crates
36# separately with serde's "derive" feature disabled. Every serde_derive release
37# is compatible with exactly one serde release because the generated code
38# involves nonpublic APIs which are not bound by semver.
39[target.'cfg(any())'.dependencies]
40serde_derive = { version = "=1.0.197", path = "../serde_derive" }
41
42
43### FEATURES #################################################################
44
45[features]
46default = ["std"]
47
48# Provide derive(Serialize, Deserialize) macros.
49derive = ["serde_derive"]
50
51# Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
52# Requires a dependency on the Rust standard library.
53std = []
54
55# Provide impls for types that require unstable functionality. For tracking and
56# discussion of unstable functionality please refer to this issue:
57#
58# https://github.com/serde-rs/serde/issues/812
59unstable = []
60
61# Provide impls for types in the Rust core allocation and collections library
62# including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may
63# be enabled without depending on all of std.
64alloc = []
65
66# Opt into impls for Rc<T> and Arc<T>. Serializing and deserializing these types
67# does not preserve identity and may result in multiple copies of the same data.
68# Be sure that this is what you want before enabling this feature.
69rc = []
70