-
Notifications
You must be signed in to change notification settings - Fork 48
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
Integration with Emscripten #117
Comments
Do you want to contribute and implement this? I'm afraid if you will not do this yourself or find someone that will do this, this will never be implemented. This project is the same as isomorphic-git and it doesn't have the main author that writes all the code for free. It's community-driven, I'm a maintainer but I rarely write code myself. |
Gotcha. Part of me was hoping it was possible and I wouldn't need to do anything, but I'll try to give it a shot. I'll close this issue for now regardless unless someone else wants to take it over. |
Actually, might make more sense to leave this open as I work on it... Kinda closed it in a rush. So one thing I've been trying instead is seeing if I can save time by bridging lightning-fs in with the Emscripten PROXYFS layer. Though, for some reason now I'm hitting an issue with none of the synchronous fs APIs working in Chrome... @jcubic , do you have any idea? My repro case is fairly straightfoward, reference this: https://github.com/VariantXYZ/LatorGit/blob/c164a5b067e0157723ea27f1d3eb7eda84f90465/index.html#L48 (Changing this line to an The resulting page can be seen here, I tested in Chrome 110.0.5481.178 (Official Build) (64-bit) with the disable security flag. It seems to be failing here, with the callback 'cb' being null... |
Sorry I have no idea. |
Ah, actually, sorry, I fundamentally misunderstood. That fs API provided needs a callback, and the fs.promises API is asynchronous while emscripten expects entirely synchronous fs calls. I wonder if the only reasonable path is to write up the synchronous functions manually... though I don't think this'll work great with IndexedDB. |
Yes, this is a problem with Emscripten. I've even created an issue after someone asked a question on StackOverflow emscripten-core/emscripten#6115 it seems there is Asyncify now, but I'm not sure how to use it. |
I've been using isomorphic-git with lightning-fs and it's working great so far, but the next stage of my project is calling an emscripten-built assembler. Unfortunately, lightning-fs doesn't seem to implement the mount functionality emscripten expects for integration like BrowserFS.
Is it already possible to utilize lightning-fs within emscripten? If not, I think it would be really useful for lightning-fs to work with emscripten out of the box similar to BrowserFS. The full integration from Git to executing build tools all within the same file system is really appealing.
The text was updated successfully, but these errors were encountered: