avl / savefile

An easy to use library to save arbitrary rust data-structures to disk (or serialize to any other stream)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attributes should be reworked

avl opened this issue · comments

Savefile uses a whole lot of attributes right now, all with the prefix 'savefile_' in their names.

It would probably be better if instead the attribute was called 'savefile', and then different arguments to this single attribute were used.

This would be a breaking change without a huge tangible benefit. There are a few ways forward

  • Just do the change, increasing the semver major version.
  • Add the new attribute in parallel with the old ones, and deprecate the old ones in the next major version.

Are you talking about a similar approach to serde, as outlined here? That would certainly make it look much cleaner.

Yes, something like:

#[savefile(versions="1..")]

instead of today's:

#[savefile_versions="1.."]