Skip to content

Support --wasm builds by adding dart.library.js_interop case to cross_cache#847

Merged
demchenkoalex merged 1 commit intoflyerhq:mainfrom
dh0er:wasm_support
Oct 9, 2025
Merged

Support --wasm builds by adding dart.library.js_interop case to cross_cache#847
demchenkoalex merged 1 commit intoflyerhq:mainfrom
dh0er:wasm_support

Conversation

@dh0er
Copy link
Contributor

@dh0er dh0er commented Aug 18, 2025

dart.library.html is not available for WASM builds, so cross cache currently fails with

'Cache is not available in your current platform.'

Since idb_shim is WASM compatible and doesn't rely on html, we can just add dart.library.js_interop to select the web implementation.

@i11010520
Copy link

Hi @dh0er, when will this PR be available?

@dh0er
Copy link
Contributor Author

dh0er commented Sep 26, 2025

That's not for me to decide, I'm not a maintainer and also waiting for it to get merged.
If you don't want to wait you can use my fork. Simply add this to your pubspec.yaml:

dependency_overrides:
  cross_cache:
    git:
      url: https://github.com/dh0er/flutter_chat_ui.git
      path: packages/cross_cache
      ref: wasm_support

@i11010520
Copy link

That's not for me to decide, I'm not a maintainer and also waiting for it to get merged. If you don't want to wait you can use my fork. Simply add this to your pubspec.yaml:

dependency_overrides:
  cross_cache:
    git:
      url: https://github.com/dh0er/flutter_chat_ui.git
      path: packages/cross_cache
      ref: wasm_support

OK. Thanks!

@demchenkoalex demchenkoalex merged commit 3650bc7 into flyerhq:main Oct 9, 2025
1 check passed
@demchenkoalex
Copy link
Member

thanks for the PR! sorry had no time for open source recently - will release now

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

Successfully merging this pull request may close these issues.

3 participants