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

Option to store native (non-wasm) in a human-readable format #55

Open
badcodecat opened this issue Jun 23, 2024 · 1 comment
Open

Option to store native (non-wasm) in a human-readable format #55

badcodecat opened this issue Jun 23, 2024 · 1 comment

Comments

@badcodecat
Copy link

badcodecat commented Jun 23, 2024

Proposal and Use-Case

I would propose an option to store the keys and values as a file in a human-readable format.
In my use case, I would like to have options for my application be configurable through an end user's text editor as well as in the application itself, this is very useful during development, or for power-users.

Implementation Ideas

As far as how this might be implemented, it looks like this crate already uses serde_json for WASM, so saving a JSON file instead might have less friction to implement. Similar to how other implementations are behind features (rocksdb or sled) a feature could be introduced (maybe json or human_readable?).

Other Considerations

Of course this comes with the downsides of being larger to store, and perhaps more inefficient to read/write (as well as added code complexity), but if it was in a non-default feature I think the benefits outweigh the downsides.

@johanhelsing
Copy link
Owner

Yes, I think it would make sense to have a json optional feature and use rmp-serde by default, for both native and wasm.

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

No branches or pull requests

2 participants