-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add custom storage backends #707
Conversation
btw, if you run |
My apologies for the failed CI runs. They were a bit stricter than I expected, and I'm developing on Windows (also do not have |
Given the repeated issues, I switched to running the CI pipelines on my fork of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor change requests. Otherwise this lgtm :)
Sorry for asking this maybe very simple question: |
That's a good question. The approach I have in mind (although I haven't gotten a chance to implement this yet) would look as follows:
This approach, while roundabout, works around the web's annoying restrictions; the |
I've been looking for a pure-Rust, embedded key value store that supports pluggable storage backends or a virtual file system interface (my use case involves storing data to the Javascript OPFS via WASM, which requires using Javascript file system APIs rather than
std::fs
). Unfortunately, there don't seem to be any available - butredb
looks like a great project, and it was easy to add this feature to it. This PR abstracts the file system code with aStorageBackend
trait, which the user can implement in order to customize howredb
interacts with the file system.Please let me know what you think, and if there are any other improvements that I should add!