-
Notifications
You must be signed in to change notification settings - Fork 1
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
Try to compile to a lower target to support older browsers #17
Comments
I managed to compile an ASM version in #18. Testing. |
The ASM runs in Chrome on Windows. However, in UWP context I get |
We seem to be targeting only browsers that support Atomics, which is quite problematic as it cuts out all Chromium for Android, and requires flags to be enabled in some other browsers. |
Well, I've built an ASM version including MIN_IE_VERSION=11, and it still fails to load in browsers other than latest Chrome and Firefox, rejecting with Atomics not defined. It seems we have to find where Atomics are being included in the build chain and compile without them, if that's possible. In #18 I added to the Makefile |
I've tested fairly extensively in #18. With the POSIX threads requirement, which I can't seem to turn off especially in As it currently stands, the libzim build can't be used as the main ZIM reader, as it would cut off much of our user base. However, we can use it as an "add-on" for Full Text search in Chromium Desktop and Firefox. It seems a little odd to use it only for that, instead of a specific Xapian compilation, but the work of integrating the ZIM reader with Xapian has been done in libzim, and would have to be developed separately if we were to use a Xapian WASM only. If anyone has a clue about how to get all the dependencies to compile single-threaded only, I'd be very grateful. |
I've opened an Issue at Emscripten, to see if I can get any help in compiling for browsers that don't support the JS Atomics object: |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
When we compiled XZ and ZSTD to WASM, we were also able to compile to ASM (the older, JavaScript-only version, which is quite fast and well optimized across most browsers). But even if we can only compile to WASM, the current build isn't working with some browsers that normally support WASM pretty well: notably UWP webview (and hence Edge Legacy), and Chrome for Android.
One possible solution might be to compile without pthreads: see emscripten-core/emscripten#13152 (comment).
But in principle, I don't see why we couldn't also try to produce ASM versions. It's normally just a change in the emcc commandline, but possibly can also be done with emmconfigure.
The text was updated successfully, but these errors were encountered: