Mounting Custom Async File System #20048
Unanswered
MeydanOzeri
asked this question in
Q&A
Replies: 2 comments 7 replies
-
anyone ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@tlively who worked on the OPFS backend might have some pointers. IIRC it involved proxying the work to a worker that can block. My advice would be to look at how that is implemented. BTW, where are you expecting the git data to actually live? (i.e. the data that normally lives in the |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I'm new to emscripten, and i have to say the learning curve is steep, and at the moment the docs are not dated so it's hard to understand how to get something done that is not the usual or simple case, hopefully i can get help here.
My use case is to try to make git run on mobile apps by compiling libgit2 to web assembly using emscripten, there is a project of that on github: https://github.com/petersalomonsen/wasm-git
My issue is that in order for me to do it successfully i must use an async file system, the executing runtime on mobile (capacitor) only supports async file system functions, due to that i don't understand how to make it possible.
What i tried so far was to mount my custom created FS:
this mounts successfully using the default MEMFS, after that as expected it tries to invoke functions on my customFS.
But, if i try to include async operations it breaks as nothing awaits those calls, so i figured its immposible.
I saw talks in github on memfs and opfs, and thought that this might be the solution, but when i build using:
-s WASMFS -lopfs.js -s FORCE_FILESYSTEM
i see there is no more a mount function on the FS object, im quite confused and cannot find any info on this, help would be appreciated.Edit: now after updates there is mount function, but its different than how it was before wasmfs and I cannot get it to work, also i dont know if async is possible, any docs or info somewhere ?
Beta Was this translation helpful? Give feedback.
All reactions