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

web wasm support #110

Closed
aakhalilian opened this issue Jan 31, 2025 · 6 comments
Closed

web wasm support #110

aakhalilian opened this issue Jan 31, 2025 · 6 comments

Comments

@aakhalilian
Copy link

building web --wasm is successful but after running stomp client connect will throw this error in the console:

'No implementation of the connect api provided'

I think it's because in web assembly dart.library.html is not there nor is dart.library.io

import 'connect_api.dart'
    if (dart.library.html) 'connect_html.dart'
    if (dart.library.io) 'connect_io.dart' as platform;

https://github.com/blackhorse-one/stomp_dart_client/blob/master/lib/src/stomp_handler.dart#L14

is there a plan to fix it and support web assembly?

@KammererTob
Copy link
Contributor

KammererTob commented Jan 31, 2025

Hey,

thanks for the ticket. I'll have to look into that. I am not sure if the package WebSocketChannel that we are currently using supports this, but we might move to https://pub.dev/packages/web_socket in the future anyways. But it might be as easy as also using connect_html.dart for wasm.

So to answer the question: Yes, we plan to also support web assembly, but i have to look into it.

@KammererTob
Copy link
Contributor

KammererTob commented Feb 2, 2025

@aakhalilian I added a PR that should make this library work with Wasm. Is there any way for you to try this out on your project before i release a new version with this?

#111

@aakhalilian
Copy link
Author

@KammererTob yes I can pull from github in my pubspec and trying it. Will update in a few hours.

Thanks for quick turnaround

@aakhalilian
Copy link
Author

@KammererTob the update has resolved our issue, pulling the branch:

#  stomp_dart_client: ^2.1.0
  stomp_dart_client:
    git:
      url: https://github.com/blackhorse-one/stomp_dart_client.git
      ref: wasm-support

@KammererTob
Copy link
Contributor

Closed via: #111

@KammererTob
Copy link
Contributor

@aakhalilian Thanks for checking it out. I will release it as a new version.

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