I'm interested more in how to use whatwg/fs with sync access handle #59
-
I plan to run sqlite in a web worker and i also want to use the new whatwg/fs. I know that whatwg/fs has support for reading/writing files synchronous if you call: I was wondering: can i use wa-sqlite in a web worker and using a sync access handle as my preferred database without having some penelty from the asyncify? i still only want the sync part of it all |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
[Edit: This initial reply is mostly wrong.] I think You might want to look at the example VFS that uses asynchronous access handles as a starting point. |
Beta Was this translation helpful? Give feedback.
-
@jimmywarting This discussion (okay, more of a soliloquy) on changes to the OPFS API may be of interest to you. |
Beta Was this translation helpful? Give feedback.
[Edit: This initial reply is mostly wrong.]
I think
createSyncAccessHandle()
has only been implemented in Chromium-based browsers in an origin trial, but yes, if that restriction doesn't bother you then you should be able to write a VFS that works without Asyncify. Note that the origin trial ends in October.You might want to look at the example VFS that uses asynchronous access handles as a starting point.