Skip to content

Commit

Permalink
Ormolu Live: update ghc-wasm-meta
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed Jan 16, 2025
1 parent 1f277c1 commit 44fb942
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
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.

6 changes: 3 additions & 3 deletions ormolu-live/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ else
"$ORMOLU_WASM" -o "$WDIR/ormolu-init.wasm"
ORMOLU_WASM_FINAL="$WDIR/ormolu-opt.wasm"
wasm-opt "$WDIR/ormolu-init.wasm" -o "$ORMOLU_WASM_FINAL" -Oz
wasm-strip "$ORMOLU_WASM_FINAL"
wasm-tools strip "$ORMOLU_WASM_FINAL" -o "$ORMOLU_WASM_FINAL"
fi

rm -rf dist
mkdir -p dist
cp "$ORMOLU_WASM_FINAL" dist/ormolu-live.wasm

wasmedge --dir /:. "$(wasm32-wasi-cabal list-bin exe:pregen)" \
wasmtime --dir .::/ "$(wasm32-wasi-cabal list-bin exe:pregen)" \
www/jsaddle.js dist/index.html

esbuild_args=(--platform=browser --format=esm)
[[ $dev_mode == false ]] && esbuild_args+=(--minify)
esbuild www/{index,worker}.js --outdir=dist --bundle "${esbuild_args[@]}"
esbuild www/{index,worker}.js --external:node:timers --outdir=dist --bundle "${esbuild_args[@]}"
esbuild www/jsaddle.js --outdir=dist "${esbuild_args[@]}"

cp node_modules/bulma/css/bulma.min.css dist/
8 changes: 2 additions & 6 deletions ormolu-live/cabal.project
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
packages: . ..

index-state: 2025-01-15T12:00:00Z
index-state: 2025-01-16T00:00:00Z

if arch(wasm32)
-- Older versions of time don't build on WASM.
constraints: time installed
allow-newer: time

package ghc-lib-parser
-- The WASM backend does not support the threaded RTS.
flags: -threaded-rts
Expand All @@ -15,4 +11,4 @@ if arch(wasm32)
source-repository-package
type: git
location: https://github.com/amesgen/splitmix
tag: 5f5b766d97dc735ac228215d240a3bb90bc2ff75
tag: cea9e31bdd849eb0c17611bb99e33d590e126164

0 comments on commit 44fb942

Please sign in to comment.