You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a union crate for this one and rusqlite that allows it to be used as the underlying storage. I have a branch that implements “random access”, which is vital for the SQLite implementation. I can see this being implemented in a way that would be optional for file systems that didn't support such an operation.
What are some things that are missing or could break here that'd prevent this from being made mainline? I could also see this being implemented as a trait for underlying VfsPathfile systems that also implement a means of producing random access files, so it'd fail at compile time.
Thanks for reaching out! Random access would indeed be a neat capability to have for a more complete feature set.
Ideally we should be catching random access on implementations that don't support it at compile time. On the other hand this might make ergonomics more complex, and make filesystems with "mixed" support more awkward to handle.
Another option might to hide seekability behind a feature, though that might also not be ideal from an ergonomics and discoverability perspective.
For now I think this looks like a good MVP. One thing that would be pretty neat is to have a basic test coverage of the update_file() function, to ensure that implementations behave in a predicatable way.
I agree re: the ergonomics of things. I think I can experiment with extension-style traits to allow a conventional VfsPath "upgrade" to one that is seekable if the underlying VfsPath implements and able to support it.
I'm working on a union crate for this one and rusqlite that allows it to be used as the underlying storage. I have a branch that implements “random access”, which is vital for the SQLite implementation. I can see this being implemented in a way that would be optional for file systems that didn't support such an operation.
What are some things that are missing or could break here that'd prevent this from being made mainline? I could also see this being implemented as a trait for underlying
VfsPath
file systems that also implement a means of producing random access files, so it'd fail at compile time.(Originally published at: https://jacky.wtf/2022/7/lGgU)
The text was updated successfully, but these errors were encountered: