Skip to content

JSFFI in GHC wasm backend instead of glue code? #3

@marc136

Description

@marc136

On https://www.tweag.io/blog/2024-11-21-ghc-wasm-th-ghci/ I learned that JSFFI made further progress, see GHC 9.13 and above: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/wasm.html#javascript-ffi-in-the-wasm-backend

So maybe I can try to use JSFFI to download the Elm packages instead of doing that in glue code?
https://github.com/tweag/ghc-wasm-miso-examples has an example using XHR

I still want to store the packages for further use. But maybe the service worker is enough for that?
My initial thought is to prefer the list of all cached files in the Worker's storage (also accessible from the main js window) over a "manual" list in LocalStorage.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions