The format is based on Keep a Changelog.
Unreleased - ReleaseDate
0.22.23 - 2025-01-30
- Update a dependency
0.22.22 - 2024-09-24
- Fix regression in 0.22.21 where
*Table::insert*
would incorrectly use the existing format of a key
0.22.21 - 2024-09-17
- Reduce key allocations
- Allow creating a table from
Item
s and not justValue
s - Allow creating
Item
s from any type thnat can create aValue
0.22.20 - 2024-07-31
- Fix regression in 0.22.19
0.22.19 - 2024-07-31
- Prevent a stack overflow when parsing very large files
0.22.18 - 2024-07-30
- Speed up whitespace parsing
- Speed up empty array parsing
- Speed up general array parsing
- Speed up general value parsing
- When recursion depth is reached, be sure to show that error rather than something else
0.22.17 - 2024-07-25
0.22.16 - 2024-07-17
- Correctly encode TOML keys with mixed quotes
0.22.15 - 2024-07-08
- Write out the
Decor
for the rootTable
(accessible throughDocumentMut
)
0.22.14 - 2024-06-03
- Allow inferring keys as string literals
- Prefer string literals if it avoids escaping double-quotes
0.22.13 - 2024-05-15
0.22.12 - 2024-04-19
- Calculate valid error span when doing
"\<multi-byte char>"
0.22.11 - 2024-04-19
- Fix a regression from 0.22.10 where errors pointing at the end of the input would produce bad spans
0.22.10 - 2024-04-18
- Parse errors now return spans that respect multi-byte characters
0.22.9 - 2024-03-20
- Expose convenience
span
functions on each item type
0.22.8 - 2024-03-18
- Drop recursion limit from 128 to 100 to work on
opt-level = 0
builds
0.22.7 - 2024-03-11
- Added
ImDocument
for parsing into an immutable document for performance and looking up spans
- error: Fix don't highlight past the end of the current line
- Renamed
Document
toDocumentMut
to clarify its role withImDocument
- Deprecated
Document
in favor ofDocumentMut
de::Deserializer
gained a default generic parameter to line up withImDocument
de::Deserializer::new
was deprecated in favor ofDeserializer::from
0.22.6 - 2024-02-16
- Correctly point people to
Key::decor
/Key::decor_mut
replacements
0.22.5 - 2024-02-13
- Update
winnow
MSRV is now 1.70
0.22.4 - 2024-02-06
0.22.3 - 2024-02-06
0.22.2 - 2024-02-06
0.22.1 - 2024-02-06
- Add
Table::key
0.22.0 - 2024-02-05
Key::decor
is now tracked inKey::dotted_decor
andKey::leaf_decor
- (edit) When a comment exists on a line before a dotted key, don't duplicate it on all following dotted keys under the same root key
0.21.1 - 2024-01-31
- (de) Improve error span for empty tables
MSRV is now 1.69
0.21.0 - 2023-11-06
- Split
default-features=false
APIs intoparse
anddisplay
features
0.20.7 - 2023-10-27
- (ser) Make sign of
nan
deterministic by always being positive
0.20.6 - 2023-10-27
- (edit) Add
Array::sort_by
0.20.5 - 2023-10-26
- (parser) Ensure the sign of NAN is preserved
- (serde) Ensure the sign of NAN is preserved
0.20.4 - 2023-10-23
- (parser) Error on invalid days of month, accounting for leap years
0.20.3 - 2023-10-23
- (edit) Add
Array::sort_by_key
MSRV is now 1.67
0.20.2 - 2023-10-03
- (parser) Correctly error when mixing inline tables with inline dotted keys
0.20.1 - 2023-09-26
- (de) Allow parsing keys into newtypes
0.20.0 - 2023-09-13
- 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 being the array
- Consistently serialize and deserialize struct and tuple variants, matching serde_json's behavior
0.19.15 - 2023-09-08
- (ser) Error rather than drop whole arrays when a single element is
None
MSRV is now 1.66.0
0.19.14 - 2023-07-14
- Small binary size reduction
0.19.13 - 2023-07-13
- Improved parse times
0.19.12 - 2023-07-05
- Add
Array::retain
,ArrayOfTables::retain
,InlineTable::retain
,Table::retain
0.19.11 - 2023-06-24
- Update
indexmap
0.19.10 - 2023-05-23
- Correctly render
Key
s in documents when they come fromKey::from_str
0.19.9 - 2023-05-18
- (ser) Newtype variant support
MSRV is now 1.64.0
0.19.8 - 2023-03-18
- Update dependency
0.19.7 - 2023-03-14
- Avoid newlines from dotted keys in std tables
0.19.6 - 2023-03-08
- Don't skip writing standard tables that are "underneath" dotted keys
0.19.5 - 2023-03-08
- Ensure indexmap's build doesn't break by forcing the
std
feature
0.19.4 - 2023-02-22
- Update dependencies
0.19.3 - 2023-02-07
- (ser) Error on i64 overflow
0.19.2 - 2023-02-06
- (parser) Error on
[dep.a]\n[dep]\n[dep]
0.19.1 - 2023-01-30
- Show features on doc.rs
0.19.0 - 2023-01-27
Offset::Custom
changed from tracking hours+minutes to minutesOffset::Custom
s parser now enforces a range of minutes- Removed deprecated
Error::line_col
infavor ofError::span
- Removed deprecated
easy
API in favor oftoml
crate
- Allow negative minute
Offset
s
0.18.1 - 2023-01-27
- (serde) Drop
derive
feature for better build times
0.18.0 - 2023-01-23
Breaking changes
- Removed
toml_edit::de::from_item
in favor oftoml_edit::de::ValueDeserializer
- Removed
toml_edit::ser::to_item
in favor oftoml_edit::ser::ValueSerializer
- Renamed
toml_edit::ser::Serializer
in favor oftoml_edit::ser::ValueSerializer
- Make
Key
only comparable by the value, not repr or decor - More consistently accept
InternalString
Repr
,Decor
, andFormatted
are no longer guaranteed to hold strings for easy comparison / evaluatoonKey
,KeyMut
,Formatted
no longer haveto_repr
, replaced bydisplay_repr
, see alsoas_repr
,default_repr
Deprecations
toml_edit::easy
in favor of thetoml
crate that is now built ontoml_edit
toml_edit::TomlError::line_col
in favor ofspan
toml_edit::de::Error::line_col
in favor ofspan
- (de): Remove allocations from format preserving
- (edit) Provide edit access to
InlineTable
s preamble - (de) Allow deserializing to
serde_spanned::Spanned
- (de) Track spans for errors
- (ser)
toml_edit::ser::Error
exposes error cases as variants - (ser) Report the name of unsupported types on error
toml_edit::TomlError::message
(andtoml_edit::de::Error
) for allowing custom error formatting
- (parser) Allow standard tables to append to dotted keys
- (parser) Reject floating point overflow
- (edit) Reduce noise in the
Debug
impls - (error) Consistently include a trailing newline
- (error) Case in errors consistent
- (ser) Correctly serialize
toml_datetime::Datetime
0.17.1 - 2023-01-03
- (compliance) Add more error checks for a dotted key that references an explicit table
0.17.0 - 2023-01-03
- (compliance) Add error check for a dotted key that references an explicit table
0.16.2 - 2022-12-28
- Prevent additional stackoverflows
0.16.1 - 2022-12-27
- Prevent stackoverflows with a recursion limit. Disable with
unbounded
feature flag
0.16.0 - 2022-12-23
The parser was re-implemented and this was considered high-risk enough to treat as a breaking release
- Significantly faster to build
- Faster to parse, especially on files with few fields per table
- Error messages are different, some are better, some are worse
0.15.0 - 2022-10-21
Datetime
'sFromStr::Err
changed fromtoml_edit::Error
totoml_edit::DatetimeParseError
Datetime
no longer implementsTryFrom
Time
no longer implementsFromStr
,TryFrom
,Serialize
, orDeserialize
Date
no longer implementsFromStr
,TryFrom
,Serialize
, orDeserialize
- Remove leading newlines in the document with default table decor
0.14.4 - 2022-05-09
- Allow enum variants as table keys
0.14.3 - 2022-04-26
Tables
- Added
OccupiedEntry::key_mut
andInlineOccupiedEntry::key_mut
- Added
TableLike::entry
andTableLike::entry
- Added
get_key_value()
andget_key_value_mut()
toTableLike
,Table
, andInlineTable
0.14.2 - 2022-03-30
- Make
perf
opt-in
0.14.1 - 2022-03-30
- make performance-specific dependencies optional with the
perf
feature (default)
0.14.0 - 2022-03-29
- Upgrade to faster
kstring
0.13.4 - 2022-01-31
- Have
toml_edit::easy::to_string_pretty
render empty tables
0.13.3 - 2022-01-28
toml_edit::value
now uses default decor
0.13.2 - 2022-01-27
- Allowing clearing table-likes
0.13.1 - 2022-01-26
- Programmatically expose line and column for some errors
- Slight performance improvement with comments
0.13.0 - 2022-01-13
iter
,get
, andcontains_key
functions were made consistent acrossTable
andInlineTable
, ignoringItem::None
.
- Reduce places users need to handle both
None
andItem::None
, making the APIs more consistent across the board - Remove a quote around a non-literal value in an error
0.12.6 - 2022-01-12
- Expose
Document::as_item
0.12.5 - 2022-01-12
- Errors now only quote literals
0.12.4 - 2022-01-07
- Fix
Table::set_position
documentation so its clear it always applies
0.12.3 - 2021-12-31
to_string_pretty
now hides empty tables
0.12.2 - 2021-12-30
- Cleaned up several error messages
toml_edit::ser::to_string_pretty
is now pretty
0.12.1 - 2021-12-28
- Added
Table::sort_values_by
andInlineTable::sort_values_by
- Clarified error message when accidentally using bare words for values
0.12.0 - 2021-12-14
- Serde trait bounds switched from
serde::Deserialize<'static>
toserde::de::DeserializeOwned
- Serde trait bounds switched from
serde::Deserialize<'static>
toserde::de::DeserializeOwned
0.11.0 - 2021-12-14
- Use
Key::parse
to parse a string of dotted keys into aVec<Key>
Key::from_str
now strictly parses TOML syntax
Key::from_str
now strictly parses TOML syntax
0.10.1 - 2021-12-01
- Allow trailing whitespace after dates
- Truncate overflowing fractional seconds rather than error (we will still roundtrip the original time)
0.10.0 - 2021-11-25
TableLike::fmt
now resets the decor to default (None
) rather than assigning the default decor- Converting between table types clears formatting
Key
now derefs to the key's value- Allow modifying key formatting with
iter_mut()
- New
visit
andvisit_mut
APIs
Value::try_from
andValue::try_into
to work with all types- Don't fail on UTF-8 BOM
- Ensure there is a trailing space for default-formatted inline tables
- Converting between table types clears formatting
Array::fmt
removes trailing comma and whitespace
0.9.1 - 2021-11-15
- Allow indexing on
InlineTable
- serde support for newtypes
- Don't error on
easy::Value::to_string
0.9.0 - 2021-11-15
- Some types in
toml_edit::ser
got shuffled around.
- Added
toml_edit::ser::to_item
for converting any serializable state to atoml_edit::Item
- Added
toml_edit::InlineTable::into_table
- Added
toml_edit::Document
now has aFrom<Table>
impl.
toml_edit::Item::into_table
now includesInlineTable
0.8.0 - 2021-11-02
- Disallow the direct creation of
toml_edit::ser::Serializer
so we can change it in the future.
- Decouple serde support from
easy
feature - Make core types impl
Deserializer
, making it easier to use them - Make core types impl
Display
so its easier to print errors to users
0.7.0 - 2021-11-02
Document::root
is now private- The
Index
implementation forItem
now panics when the index is not found- Use
Item::get
andItem::get_mut
instead
- Use
Document
now derefs toTable
for easier accessItem
now hasget
/get_mut
likeeasy::Value
- Clarified role of
toml_edit::easy
0.6.0 - 2021-10-14
- Add
TableLike::set_dotted
so you can make a table dotted, independent of its type
- Allow dotted inline-tables in standard tables
toml_edit::TableLike
is now sealed, disallowing others to implement it
0.5.0 - 2021-09-30
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 |
- Removed ambiguity between
String
andDatetime
when deserializing - Hand implemented
Deserialize
fortoml_edit::easy::Value
to dispatch on type, rather than trying every variant.
Datetime
is no longer a string inserde
s data model but a proprietary type.
0.4.0 - 2021-09-29
- Changed some strings callers generally don't interact with (e.g.
Into<String>
) to an opaque type, allowing us to change how we allocate most strings without requiring breaking changes in the future.- This impacts
Key
,Repr
, andDecor
- This does not impact
Value
, assuming people want a familiar type over performance
- This impacts
- Support trailing quotes in strings
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:
- Batch create strings
- Small-string optimization
- Removed superfluous allocations
- Switched from recursion to looping
- Avoid decoding bytes to
char
- Optimized grammar selection rules which also reduced allocations further
0.3.1 - 2021-09-14
- Sane default formatting for arrays
0.3.0 - 2021-09-13
- Added support for TOML 1.0, with one functional caveat and one format-preserving caveat
- Added
Item::into_value
- Changed
Table
andInlineTable
to be more Map-like - Expanded support in
TableLike
- Added toml-rs-compatible API via the
toml_edit::easy
module for when developers want to ensure consistency between format-preserving and general TOML work, with one caveat. - Exposed more control over formatting, with ability to modify any key or value whitespace.
- Fixed it so we preserve formatting on dotted keys in standard table headers
- Dropped
chrono
dependency
This release was sponsored by Futurewei
0.2.1 - 2021-06-07
- Added
Table::decor
. #97 - Added
IterMut
forTable
. #100 - Added
Table::get_mut
. #106 - Updated
combine
to 4.5. #107
- Added format preserving mutation functions for
Array
. #88
array.push
now returns aResult
.