Unofficial GHC JS cross bindists have been built by me for this release (provisional platform/distro support):
And they’ve been added to the ghcup-cross-0.0.8.yaml
channel: Add javascript-unknown-ghcjs-9.10.0.20240413 by hasufell · Pull Request #203 · haskell/ghcup-metadata · GitHub
To try, you first need emscripten:
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
Then install the GHC cross via ghcup:
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-cross-0.0.8.yaml
emconfigure ghcup install ghc --set javascript-unknown-ghcjs-9.10.0.20240413
Then do some hello-world:
echo 'main = putStrLn "hello world"' > hello.hs
javascript-unknown-ghcjs-ghc -fforce-recomp hello.hs
./hello