NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #97 most downloaded on crates.io
Yet another format-preserving TOML parser.
Last release 21 days ago
11 Sep 2026
Ships fairly regularly
a new release about every 3 weeks
Most releases are documented
notes for 36 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
128 releases · first in 2017
### Features - *(edit)* Add Array::sort_by
Array::sort_by*(parser)* Ensure the sign of NAN is preserved
*(parser)* Error on invalid days of month, accounting for leap years
One column per quarter.
*(edit)* Add Array::sort_by_key
Array::sort_by_keyMSRV is now 1.67
*(parser)* Correctly error when mixing inline tables with inline dotted keys
*(de)* Allow parsing keys into newtypes
Serialization and deserialization of tuple variants has changed from being an array to being a table with the key being the variant name and the value
*(ser)* Error rather than drop whole arrays when a single element is None
NoneMSRV is now 1.66.0
### Performance - Small binary size reduction
### Performance - Improved parse times
Add Array::retain, ArrayOfTables::retain, InlineTable::retain, Table::retain
Array::retain, ArrayOfTables::retain, InlineTable::retain, Table::retain### Internal - Update indexmap
indexmapCorrectly render Keys in documents when they come from Key::from_str
Keys in documents when they come from Key::from_str*(ser)* Newtype variant support
MSRV is now 1.64.0
### Internal - Update dependency
Avoid newlines from dotted keys in std tables
Don't skip writing standard tables that are "underneath" dotted keys
Ensure indexmap's build doesn't break by forcing the std feature
std feature### Internal - Update dependencies
### Fixes - *(ser)* Error on i64 overflow
*(parser)* Error on [dep.a]\n[dep]\n[dep]
[dep.a]\n[dep]\n[dep]### Documentation - Show features on doc.rs
Removed deprecated Error::line_col infavor of Error::span
Offset::Custom changed from tracking hours+minutes to minutesOffset::Customs parser now enforces a range of minutesError::line_col infavor of Error::spaneasy API in favor of toml crateOffsets*(serde)* Drop derive feature for better build times
derive feature for better build timesRemoved toml_edit::from_item in favor of toml_edit::ValueDeserializer
Breaking changes
toml_edit::de::from_item in favor of toml_edit::de::ValueDeserializertoml_edit::ser::to_item in favor of toml_edit::ser::ValueSerializertoml_edit::ser::Serializer in favor of toml_edit::ser::ValueSerializerKey only comparable by the value, not repr or decorInternalStringRepr, Decor, and Formatted are no longer guaranteed to hold strings for easy comparison / evaluatoonKey, KeyMut, Formatted no longer have to_repr, replaced by display_repr, see also as_repr, default_reprDeprecations
toml_edit::easy in favor of the toml crate that is now built on toml_edittoml_edit::TomlError::line_col in favor of spantoml_edit::de::Error::line_col in favor of spanInlineTables preambleserde_spanned::Spannedtoml_edit::ser::Error exposes error cases as variantstoml_edit::TomlError::message (and toml_edit::de::Error) for allowing custom error formattingDebug implstoml_datetime::Datetime*(compliance)* Add more error checks for a dotted key that references an explicit table
*(compliance)* Add error check for a dotted key that references an explicit table
Prevent additional stackoverflows
Prevent stackoverflows with a recursion limit. Disable with unbounded feature flag
unbounded feature flagThe parser was re-implemented and this was considered high-risk enough to treat as a breaking release
The parser was re-implemented and this was considered high-risk enough to treat as a breaking release
Datetime's FromStr::Err changed from toml_edit::Error to toml_edit::DatetimeParseError
Datetime's FromStr::Err changed from toml_edit::Error to toml_edit::DatetimeParseErrorDatetime no longer implements TryFromTime no longer implements FromStr, TryFrom, Serialize, or DeserializeDate no longer implements FromStr, TryFrom, Serialize, or DeserializeAllow enum variants as table keys
Added OccupiedEntry::key_mut and InlineOccupiedEntry::key_mut
Tables
OccupiedEntry::key_mut and InlineOccupiedEntry::key_mutTableLike::entry and TableLike::entryget_key_value() and get_key_value_mut() to TableLike, Table, and InlineTable### Fixes - Make perf opt-in
perf opt-inmake performance-specific dependencies optional with the perf feature (default)
perf feature (default)### Performance - Upgrade to faster kstring
kstringHave toml_edit::to_string_pretty render empty tables
toml_edit::easy::to_string_pretty render empty tablestoml_edit::value now uses default decor
toml_edit::value now uses default decor### Features - Allowing clearing table-likes
Programmatically expose line and column for some errors
iter, get, and contains_key functions were made consistent across Table and InlineTable, ignoring Item::None.
iter, get, and contains_key functions were made consistent across Table and InlineTable, ignoring Item::None.None and Item::None, making the APIs more consistent across the board### Fixes - Expose Document::as_item
Document::as_item### Fixes - Errors now only quote literals
Fix Table::set_position documentation so its clear it always applies
Table::set_position documentation so its clear it always appliesto_string_pretty now hides empty tables
to_string_pretty now hides empty tablesCleaned up several error messages
toml_edit::ser::to_string_pretty is now prettyAdded Table::sort_values_by and InlineTable::sort_values_by
Table::sort_values_by and InlineTable::sort_values_bySerde trait bounds switched from serde::Deserialize<'static> to serde::DeserializeOwned
serde::Deserialize<'static> to serde::de::DeserializeOwnedserde::Deserialize<'static> to serde::de::DeserializeOwnedUse Key::parse to parse a string of dotted keys into a Vec
Key::parse to parse a string of dotted keys into a Vec<Key>Key::from_str now strictly parses TOML syntaxKey::from_str now strictly parses TOML syntaxAllow trailing whitespace after dates
TableLike::fmt now resets the decor to default (None) rather than assigning the default decor
TableLike::fmt now resets the decor to default (None) rather than assigning the default decorKey now derefs to the key's valueiter_mut()visit and visit_mut APIsValue::try_from and Value::try_into to work with all typesArray::fmt removes trailing comma and whitespaceDon't error on easy::Value::to_string
InlineTableeasy::Value::to_stringSome types in toml_edit::ser got shuffled around.
toml_edit::ser got shuffled around.toml_edit::ser::to_item for converting any serializable state to a toml_edit::Itemtoml_edit::InlineTable::into_tabletoml_edit::Document now has a From<Table> impl.toml_edit::Item::into_table now includes InlineTableDisallow the direct creation of toml_edit::Serializer so we can change it in the future.
toml_edit::ser::Serializer so we can change it in the future.easy featureDeserializer, making it easier to use themDisplay so its easier to print errors to usersThe Index implementation for Item now panics when the index is not found
Document::root is now privateIndex implementation for Item now panics when the index is not found
Item::get and Item::get_mut insteadDocument now derefs to Table for easier accessItem now has get / get_mut like easy::Valuetoml_edit::easyAdd TableLike::set_dotted so you can make a table dotted, independent of its type
TableLike::set_dotted so you can make a table dotted, independent of its typetoml_edit::TableLike is now sealed, disallowing others to implement it| toml_edit | cargo init Cargo.toml | Cargo's Cargo.toml |
| toml_edit | cargo init Cargo.toml |
Cargo's Cargo.toml |
|---|---|---|
| HEAD | 4.0 us | 149 us |
| toml_edit::easy | cargo init Cargo.toml |
Cargo's Cargo.toml |
|---|---|---|
| v0.4.0 | 16.9 us | 602 us |
| HEAD | 5.0 us | 179 us |
| toml | cargo init Cargo.toml |
Cargo's Cargo.toml |
|---|---|---|
| v0.5.8 | 4.7 us | 121 us |
String and Datetime when deserializingDeserialize for toml_edit::easy::Value to dispatch on type, rather than trying every variant.Datetime is no longer a string in serdes data model but a proprietary type.Into ) to an opaque type, allowing us to change how we allocate most strings without requiring breaking changes in the future.
Into<String>) to an opaque type, allowing us to change how we allocate most
strings without requiring breaking changes in the future.
Key, Repr, and DecorValue, assuming people want a familiar type over performance| toml_edit | cargo init Cargo.toml |
Cargo's Cargo.toml |
|---|---|---|
| v0.3.1 | 8.7 us | 271 us |
| HEAD | 4.1 us | 150 us |
| toml_edit::easy | cargo init Cargo.toml |
Cargo's Cargo.toml |
|---|---|---|
| v0.3.1 | 21.2 us | 661 us |
| HEAD | 18.6 us | 630 us |
| toml | cargo init Cargo.toml |
Cargo's Cargo.toml |
|---|---|---|
| v0.5.8 | 4.8 us | 125 us |
Changes include:
charSane default formatting for arrays
Added support for TOML 1.0, with one functional caveat and one format-preserving caveat
Item::into_valueTable and InlineTable to be more Map-likeTableLiketoml_edit::easy module for when developers want to ensure consistency between format-preserving and general TOML work, with one caveat.chrono dependencyThis release was sponsored by Futurewei
Your coding agent can read these notes before it upgrades. Set up the MCP server →