Skip to content
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: WASM Support #214

Open
2 tasks done
lishaduck opened this issue Aug 9, 2024 · 5 comments
Open
2 tasks done

🚀 Feature: WASM Support #214

lishaduck opened this issue Aug 9, 2024 · 5 comments

Comments

@lishaduck
Copy link

lishaduck commented Aug 9, 2024

🔖 Feature description

Update dependencies (& replace unmaintained dependencies, etc) to remove all dependence on dart:html, as it is not WASM compatible. You should use package:web & dart:js_interop for modern JS FFI.

🎤 Pitch

It allows migrating WASM-compatible apps to Appwrite, and migrating existing Appwrite apps to WASM.
The WASM renderer is up to 3x faster1, and smaller[citation needed].

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Footnotes

  1. Averaging 2x; source: https://medium.com/flutter/whats-new-in-flutter-3-22-fbde6c164fe3

@lishaduck
Copy link
Author

lishaduck commented Aug 9, 2024

Known wasm-incompatible dependencies:

  • package:flutter_web_auth_2@^3 (v4 alphas support package:web; should be non-breaking beyond a min. An Android SDK & Flutter bump is all.)
  • web_socket_channel@2 (doesn't support package:web@^1; @3 is out, but other dependencies don't support it)

@lishaduck
Copy link
Author

lishaduck commented Aug 9, 2024

To work around this, put this in your pubspec.yaml:

dependency_overrides:
  flutter_web_auth_2: 4.0.1

@lishaduck
Copy link
Author

lishaduck commented Aug 10, 2024

Ok, looked into it more, looks like appwrite/sdk-generator#893 fixed the web_socket_channel, this repo just needs a re-gen (though it is unnecessarily breaking, v2 & v3 are virtually identical and you could support both with 0 effort).
Appwrite shouldn't depend on alphas for flutter_web_auth_2, I can wait a few weeks.

EDIT: v13 fixes web_socket_channel, but still depends on an old flutter_web_auth_2 (v4 of which is now stable)

@vaishakhpj
Copy link

Please fix this asap waiting for a month

@lishaduck
Copy link
Author

Please fix this asap waiting for a month

You can use dependency_overrides to get flutter_web_auth_2 v4. If you'd rather not, you can also PR appwrite/sdk-generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants