-
Notifications
You must be signed in to change notification settings - Fork 125
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
[FEATURE] Compile for WASM #473
Comments
Thanks for the feature request @srmncnk. I allowed myself to shorten the error log a bit. The current web implementation was written when js/dart interop was still in the early days. Adding support for wasm will be a bigger migration, maybe even rewrite of the |
@josxha Thanks for the quick response. 👍 I'm aware of the scope, I took a whack at an old mapbox web implementation, but it's no longer maintained and Mapbox themselves don't bother with web in their new package either. So all those are plus points for you guys. JS interop in the early days was way less strict than it is now, it's kind of a surprise flutter took that turn. I don't have resources to do it either, I'll be monitoring this though. |
I tinkered around a bit with wasm compatible bindings for maplibre-gl-js. It's currently more a proof-of-concept and by far not feature complete but a basic map and some geojson manipulation already works fine. However I'm still evaluating if it's better to merge it into flutter-maplibre-gl or take it as a chance to start a brand new rewrite to get rid of some of the problems flutter-maplibre-gl has. |
Great news @josxha, I'd be interested in seeing what you're doing. I'd be in favour of merging it into flutter-maplibre-gl, the plus point of flutter is same codebase everywhere. I know about the caveats, been digging into the original community mapbox package myself, it's not ideal. |
I can make the repository public once the basics are implemented. Its purpose at the beginning was just to test the new js interop and some other things. It has currently only few features. The plan is to have a solid base for a quicker implementation of other bindings.
I am tending to not merging it into flutter-maplibre-gl but to keep it as an alternative flutter wrapper for maplibre-gl-js and maplibre-native. Reasons for this are:
Please take all these information with a grain of salt. These are currently just the plans I'd like to focus on. All of these points could be worked into the current maplibre-gl-js as well. I'm happy to review any pull request to flutter-maplibre-gl if anyone wants to migrate its js interop. (: |
Feature Description
I want to build maplibre for web but using the wasm switch.
Describe alternatives you've considered
Mapbox has a few implementation out there but none are as good as this repository.
Additional context
Migration guide:
https://dart.dev/interop/js-interop
https://dart.dev/interop/js-interop/package-web
Errors while building for wasm:
The text was updated successfully, but these errors were encountered: