This file targets helping you switch to the newest version, from the last version.
Note: You're able to look at the commit history of this file to see past versions of this file, for older versions of the crate.
This tutorial currently targets conversion from 1.1.x to 1.2.0.
Note: Always check the GitHub version of this file, as it's the most up to date.
1.2.0 introduces ordinary JSON using serde_json and moves away from JSON5, as the json5 crate this project uses hasn't received an update in ~3 years.
I don't plan on deprecating JSON5 as that crate still works well enough, though I might move to a better crate in the future.
ConfigSetupOptions.save_on_drop
is now deprecated since it can lead to unsafe I/O while your program is exiting. Just useConfig::save
instead. (thanks to @bobhy for bringing this ancient piece of code to my attention)
You can view the examples directory for examples regarding the new syntax.