1[package]
2name = "toml"
3version = "0.8.12"
4keywords = ["encoding", "toml"]
5categories = ["encoding", "parser-implementations", "parsing", "config"]
6description = """
7A native Rust encoder and decoder of TOML-formatted files and streams. Provides
8implementations of the standard Serialize/Deserialize traits for TOML data to
9facilitate deserializing and serializing Rust structures.
10"""
11authors = ["Alex Crichton <alex@alexcrichton.com>"]
12repository.workspace = true
13homepage.workspace = true
14license.workspace = true
15edition.workspace = true
16rust-version.workspace = true
17include.workspace = true
18
19[package.metadata.docs.rs]
20all-features = true
21rustdoc-args = ["--cfg", "docsrs"]
22
23[package.metadata.release]
24pre-release-replacements = [
25 {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
26 {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
27 {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
28 {file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
29 {file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/toml-rs/toml/compare/{{tag_name}}...HEAD", exactly=1},
30]
31
32[features]
33default = ["parse", "display"]
34parse = ["dep:toml_edit", "toml_edit?/parse"]
35display = ["dep:toml_edit", "toml_edit?/display"]
36
37# Use indexmap rather than BTreeMap as the map type of toml::Value.
38# This allows data to be read into a Value and written back to a TOML string
39# while preserving the order of map keys in the input.
40preserve_order = ["indexmap"]
41
42[dependencies]
43serde = "1.0.145"
44indexmap = { version = "2.0.0", optional = true }
45toml_edit = { version = "0.22.8", path = "../toml_edit", default-features = false, features = ["serde"], optional = true }
46toml_datetime = { version = "0.6.5", path = "../toml_datetime", features = ["serde"] }
47serde_spanned = { version = "0.6.5", path = "../serde_spanned", features = ["serde"] }
48
49[dev-dependencies]
50serde = { version = "1.0.197", features = ["derive"] }
51serde_json = "1.0.114"
52toml-test-harness = "0.4.8"
53toml-test-data = "1.8.0"
54snapbox = "0.4.16"
55
56[[test]]
57name = "decoder_compliance"
58harness = false
59
60[[test]]
61name = "encoder_compliance"
62harness = false
63
64[[example]]
65name = "decode"
66required-features = ["parse", "display"]
67
68[[example]]
69name = "enum_external"
70required-features = ["parse", "display"]
71
72[[example]]
73name = "toml2json"
74required-features = ["parse", "display"]
75