[package] name = "toml" version = "0.9.8" description = """ A native Rust encoder and decoder of TOML-formatted files and streams. Provides implementations of the standard Serialize/Deserialize traits for TOML data to facilitate deserializing and serializing Rust structures. """ categories = ["encoding", "parser-implementations", "parsing", "config"] keywords = ["encoding", "toml", "no_std"] repository.workspace = true license.workspace = true edition.workspace = true rust-version.workspace = true include.workspace = true [package.metadata.docs.rs] all-features = true rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/toml-rs/toml/compare/{{tag_name}}...HEAD", exactly=1}, ] [features] default = ["std", "serde", "parse", "display"] std = ["indexmap?/std", "serde_core?/std", "toml_parser?/std", "toml_writer?/std", "toml_datetime/std", "serde_spanned/std"] serde = ["dep:serde_core", "toml_datetime/serde", "serde_spanned/serde"] parse = ["dep:toml_parser", "dep:winnow"] display = ["dep:toml_writer"] fast_hash = ["preserve_order", "dep:foldhash"] debug = ["std", "toml_parser?/debug", "dep:anstream", "dep:anstyle"] # Provide a method disable_recursion_limit to parse arbitrarily deep structures # without any consideration for overflowing the stack. Additionally you will # need to be careful around other recursive operations on the parsed result # which may overflow the stack after deserialization has completed, including, # but not limited to, Display and Debug and Drop impls. unbounded = [] # Use indexmap rather than BTreeMap as the map type of toml::Value. # This allows data to be read into a Value and written back to a TOML string # while preserving the order of map keys in the input. preserve_order = ["dep:indexmap", "std"] [dependencies] serde_core = { version = "1.0.225", default-features = false, features = ["alloc"], optional = true } indexmap = { version = "2.11.4", default-features = false, optional = true } toml_parser = { version = "1.0.4", path = "../toml_parser", default-features = false, features = ["alloc"], optional = true } winnow = { version = "0.7.13", default-features = false, optional = true } anstream = { version = "0.6.20", optional = true } anstyle = { version = "1.0.11", optional = true } toml_datetime = { version = "0.7.3", path = "../toml_datetime", default-features = false, features = ["alloc"] } toml_writer = { version = "1.0.4", path = "../toml_writer", default-features = false, features = ["alloc"], optional = true } serde_spanned = { version = "1.0.3", path = "../serde_spanned", default-features = false, features = ["alloc"] } foldhash = { version = "0.2.0", default-features = false, optional = true } [dev-dependencies] serde = { version = "1.0.225", features = ["derive"] } serde_json = "1.0.145" toml-test-harness = { version = "1.3.3", features = ["snapshot"] } toml-test-data = "2.3.3" snapbox = "0.6.21" walkdir = "2.5.0" itertools = "0.14.0" serde-untagged = "0.1.9" [[test]] name = "decoder_compliance" harness = false [[test]] name = "encoder_compliance" harness = false [[test]] name = "encoder_pretty_compliance" harness = false [[example]] name = "decode" required-features = ["parse", "display", "serde"] [[example]] name = "enum_external" required-features = ["parse", "display", "serde"] [[example]] name = "toml2json" required-features = ["parse", "display", "serde"] [lints] workspace = true