What's changed
This version introduces very large changes to different areas of the crate, splitting off certain parts into their own crates, reworking the reader API, improving some of the exobiology prediction logic, and including changes required for the new Nomad vessel.
Splitting off crates
Code and logic related to exobiology predictions and the state module as a whole have been split off into their own separate crates. I've long been thinking about how to best cover the different kinds of use-cases that people might have for this library; questioning between moving things behind features flags or splitting them off into their own crates. Eventually decided to split things off, primarily in order to allow these aspects of the library to evolve on their own and makes it easier to introduce new things on top of that in the future. The main crate contains everything you to parse the contents of the game's log directory. I'm still pondering about maybe splitting it ever further by splitting of the shared models (like the galaxy module, ship module etc.) into its own crate to cover cases where you're not concerned with parsing the actual contents of the logs (like in standalone tools or the SLE format), but I think that's pushing it for now.
Reworked reader API
Finally got an new reader API together that I'm happy with. The new API splits up the different kinds of readers and functionality into different models, which each their specific role when creating an application. This means that by default you'll need to combine these different models yourself in order to do what the old readers automatically did for you. However, the fs::common and fs::common_async modules provide some common strategies and combinations akin to the old API and makes it easy to add new common strategies in the future without changing any behavior in the underlying models.
These changes were made because the old API, while it worked for the strategies that they were made for, they could not really be used in any other way than the specific parsing strategy they were created to handle. The new API makes this composable and now support additional functionalities like reading over some generic Read allow for in-memory parsing without a file system which makes it easier to work with for example in server side application (one of my original goals for this project.)
Other changes
Improvements that were made quite a bit ago to the exobiology prediction logic were left in a stale PR that I didn't have time to complete. Some species have had their spawn conditions revised after testing, while others were not looked at at all. Still the improvements that were made are now included in the new ed-exobiology crate.
You'd almost forget it, but changes that are required for the new Nomad vessel to be parsed correctly have also been included in this release.
Changelog
- Added the
iomodule which handles parsing the contents of the log files and adds support for reading from sources that are not the file system. - Added examples for different log reading strategies you can use as a basis for your own implementation.
- Added the
fsmodule for reading and watching logs and files on the file system. - Moved
auto_detect_journal_pathfrom thejournalmodule to thefsmodule. - The different json file handlers (for parsing 'Cargo.json', 'Status.json' etc.) have been removed in favor of the
fs::JsonFile. - Remove the
journalmodule. Most things are now covered by thefsmodule. - Removed the readers from the
logsmodule; use theioandfsmodules instead. - Removed exobiology prediction logic from the main crate into a separate crate.
Full Changelog: 0.12.4...0.13.0