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

Use TH-enabled build, remove custom miso #24

Merged
merged 2 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ 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

- name: install-sass
run: |
npm install -g sass
- uses: dw-labs-org/dart-sass-gha@v1

- name: build-frontend
run: |
Expand Down Expand Up @@ -80,9 +83,7 @@ jobs:
env:
FLAVOUR: '9.10'

- name: install-sass
run: |
npm install -g sass
- uses: dw-labs-org/dart-sass-gha@v1

- name: build-frontend
run: |
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -44,13 +43,15 @@ 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/).

Then:

```sh
source ~/.ghc-wasm/env
npm install -g sass
cd frontend
./build.sh
```
Expand Down
22 changes: 10 additions & 12 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
packages: . hs2048

index-state: 2024-09-29T15:37:55Z
index-state: 2024-10-26T13:27:42Z

if arch(wasm32)
-- Required for TemplateHaskell. When using wasm32-wasi-cabal from
-- ghc-wasm-meta, this is superseded by the global cabal.config.
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
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.