Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCP-240725A: Optional In-Memory Container Persistence Feature #9

Open
will-bitlight opened this issue Jul 25, 2024 · 2 comments
Open
Assignees
Labels
C-stdlib Proposes changes to standard library S-implemented
Milestone

Comments

@will-bitlight
Copy link

Background

In rgb-std, we provide memory-based state storage containers such as MemStash and Mem*. We have also implemented a feature named fs for these containers to provide persistent storage. In rgb-std, this feature is optional and not enabled by default. However, in rgb (rgb-runtime), we have enabled the fs feature by default at the workspace level. This requires downstream users, when using rgb, to handle the related API and configure persistent paths even if they do not need persistence.

Proposal

We propose to change this behavior so that persistence for memory containers is also optional when using rgb. The specific changes are as follows:

  • At the workspace level of rgb, do not enable the rgb-std fs feature by workspace level.
  • Modify Cargo.toml from fs = ["serde", "bp-wallet/fs"] to fs = ["serde", "bp-wallet/fs", "rgb-std/fs"].

To ensure consistency of the fs feature, we will also synchronize the configuration changes in the following repositories:

  • rgb
  • rgb-interfaces
  • rgb-schemata

Through these changes, we hope to provide downstream users with more flexibility, allowing them to choose whether to enable persistence features based on their needs.

@dr-orlovsky dr-orlovsky added C-stdlib Proposes changes to standard library S-accepted Accepted proposals for the implementation labels Jul 25, 2024
@dr-orlovsky dr-orlovsky added this to the v0.11 milestone Jul 25, 2024
@dr-orlovsky
Copy link
Member

dr-orlovsky commented Jul 25, 2024

I do agree with the proposal. Can you please work on the implementation?

@will-bitlight
Copy link
Author

I do agree with the proposal. Can you please work on the implementation?

No problem, I will implement our proposal in the above Repo :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-stdlib Proposes changes to standard library S-implemented
Projects
Status: Done
Development

No branches or pull requests

2 participants