Skip to content

feat: add resource persistence plugin#7

Merged
jacktbeaumont merged 1 commit intomainfrom
sc-3102
Feb 20, 2026
Merged

feat: add resource persistence plugin#7
jacktbeaumont merged 1 commit intomainfrom
sc-3102

Conversation

@jacktbeaumont
Copy link
Copy Markdown
Contributor

This PR introduces a persistency API for Polaris, enabling plugins to register resources for session-level save and load.

Key changes:

  • Storable trait: Marks a resource as persistable via storage_key() and version(), providing stable identity for serialized state.
  • #[derive(Storable)] macro: Generates the trait impl from #[storable(key = "...", version = "...")] attributes.
  • PersistenceAPI: Server-level API where plugins register storable resources during ready() phase. Manages type-erased ResourceSerializer instances internally.
  • PersistencePlugin: Inserts PersistenceAPI into the server.

Copy link
Copy Markdown
Contributor

@localminimum localminimum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jacktbeaumont jacktbeaumont merged commit 8bf487a into main Feb 20, 2026
1 check passed
@jacktbeaumont jacktbeaumont deleted the sc-3102 branch February 20, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants