1[package]
2name = "serde"
3version = "1.0.219"
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[package.metadata.playground]
24features = ["derive", "rc"]
25
26[package.metadata.docs.rs]
27features = ["derive", "rc", "unstable"]
28targets = ["x86_64-unknown-linux-gnu"]
29rustdoc-args = [
30 "--generate-link-to-definition",
31 "--extern-html-root-url=core=https://doc.rust-lang.org",
32 "--extern-html-root-url=alloc=https://doc.rust-lang.org",
33 "--extern-html-root-url=std=https://doc.rust-lang.org",
34]
35
36# This cfg cannot be enabled, but it still forces Cargo to keep serde_derive's
37# version in lockstep with serde's, even if someone depends on the two crates
38# separately with serde's "derive" feature disabled. Every serde_derive release
39# is compatible with exactly one serde release because the generated code
40# involves nonpublic APIs which are not bound by semver.
41[target.'cfg(any())'.dependencies]
42serde_derive = { version = "=1.0.219", path = "../serde_derive" }
43
44
45### FEATURES #################################################################
46
47[features]
48default = ["std"]
49
50# Provide derive(Serialize, Deserialize) macros.
51derive = ["serde_derive"]
52
53# Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
54# Requires a dependency on the Rust standard library.
55std = []
56
57# Provide impls for types that require unstable functionality. For tracking and
58# discussion of unstable functionality please refer to this issue:
59#
60# https://github.com/serde-rs/serde/issues/812
61unstable = []
62
63# Provide impls for types in the Rust core allocation and collections library
64# including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may
65# be enabled without depending on all of std.
66alloc = []
67
68# Opt into impls for Rc<T> and Arc<T>. Serializing and deserializing these types
69# does not preserve identity and may result in multiple copies of the same data.
70# Be sure that this is what you want before enabling this feature.
71rc = []
72