diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09b8e19..4be68eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,10 +40,15 @@ jobs: ~/.ghc-wasm/add_to_github_path.sh popd + - name: cabal + run: | + ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-prereleases-0.0.8.yaml + ghcup install cabal --set 3.15.0.0.2024.10.3 + - name: wasm32-wasi-ghc run: | ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-cross-0.0.8.yaml - ghcup install ghc --set wasm32-wasi-9.10.1 -- $CONFIGURE_ARGS + ghcup install ghc --set wasm32-wasi-9.10.1.20241021 -- $CONFIGURE_ARGS - uses: dw-labs-org/dart-sass-gha@v1 diff --git a/README.md b/README.md index ab6383e..1b2188c 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,8 @@ The GHC wasm backend supports the feature, allowing Haskell wasm apps to interop with JavaScript seamlessly in the browser. This repo contains a few examples to demonstrate this ability, all of which based on the -[`miso`](https://haskell-miso.org) frontend framework, using an -unofficial [port](https://github.com/amesgen/miso/tree/remove-th) as -well as an experimental +[`miso`](https://haskell-miso.org) frontend framework as well as +an experimental [`jsaddle-wasm`](https://github.com/amesgen/jsaddle-wasm) library under the hood. @@ -44,7 +43,8 @@ You can set up the toolchain by either: [`ghc-wasm-meta`](https://gitlab.haskell.org/ghc/ghc-wasm-meta#getting-started-without-nix) directly to set up ghc head or ghc 9.10 - Using [`ghcup`](https://www.haskell.org/ghcup/guide/#cross-support) - to set up ghc 9.10 + to set up ghc 9.10 (9.10.1.20241021 or later, with TemplateHaskell support) + and cabal >=3.15. Also install [Sass](https://sass-lang.com/install/). diff --git a/cabal.project b/cabal.project index bdc137f..5770ba7 100644 --- a/cabal.project +++ b/cabal.project @@ -1,24 +1,21 @@ packages: . hs2048 -index-state: 2024-09-29T15:37:55Z +index-state: 2024-10-20T13:44:33Z if arch(wasm32) + -- Required for TemplateHaskell. + shared: True + + -- https://github.com/haskellari/time-compat/issues/37 + -- Older versions of time don't build on WASM. + constraints: time installed + allow-newer: time + -- https://github.com/haskellari/splitmix/pull/73 source-repository-package type: git location: https://github.com/amesgen/splitmix tag: 5f5b766d97dc735ac228215d240a3bb90bc2ff75 - -- remove TemplateHaskell - source-repository-package - type: git - location: https://github.com/amesgen/miso - tag: 27dd5fc80be9d0a3b80a9ecc81ee3401bc610e01 - - source-repository-package - type: git - location: https://github.com/amesgen/jsaddle-wasm - tag: be129c788f8ca1ea2e9cc1515397c1a46d02bb41 - package aeson flags: -ordered-keymap diff --git a/flake.lock b/flake.lock index c49ba51..a7dd7c3 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ }, "locked": { "host": "gitlab.haskell.org", - "lastModified": 1727083389, - "narHash": "sha256-O3HXt6hHkZNyib19rbfaQqyiEwZfdC1VQhNCWMY9y9s=", + "lastModified": 1729816601, + "narHash": "sha256-/GrnRM/5f8DdC+8kuGLJijMBsUULZW5QJU3JcJFGJoc=", "owner": "ghc", "repo": "ghc-wasm-meta", - "rev": "7bc201976c4164fbd4403777ccee8dd0c2210bcb", + "rev": "64e6c8942a7805c0b3a2a7b74846ad962d142208", "type": "gitlab" }, "original": { @@ -41,11 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726755586, - "narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=", + "lastModified": 1729665710, + "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e", + "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", "type": "github" }, "original": {