#212 RFE: use an actual TOML library for automated patching of Cargo.toml
Opened 3 months ago by decathorpe. Modified 3 months ago

Using an actual TOML library for parsing Cargo.toml should allow us to simplify the currently implemented simple state-machine / line-based parser / editor, and would hopefully cover more corner cases of valid TOML syntax.

Apparently Python 3.11 will include a toml parser in its standard library (https://docs.python.org/3.11/library/tomllib.html), but it will only support parsing / reading TOML - but not writing it. But the docs recommend using tomlkit for style-preserving parsing / editing / writing of TOML files.

Login to comment on this ticket.