mirror of
https://github.com/tweag/asterius.git
synced 2024-09-11 08:55:32 +03:00
Add example
This commit is contained in:
parent
15248d4872
commit
9ff8c8dfdf
7
.github/workflows/setup-deps.sh
vendored
7
.github/workflows/setup-deps.sh
vendored
@ -4,20 +4,21 @@ set -eu
|
||||
|
||||
npm install -g parcel-bundler@1.12.4
|
||||
|
||||
sudo apt install -y \
|
||||
apt install -y \
|
||||
alex \
|
||||
c2hs \
|
||||
cpphs \
|
||||
happy \
|
||||
cmake \
|
||||
libnuma-dev
|
||||
|
||||
curl -L https://github.com/WebAssembly/binaryen/archive/version_93.tar.gz | tar xz -C /tmp
|
||||
cd /tmp/binaryen-version_93
|
||||
mkdir build
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-G "Unix Makefiles" \
|
||||
..
|
||||
sudo make -j2 install
|
||||
make -j2 install
|
||||
|
@ -304,7 +304,7 @@ ahcDistMain logger task (final_m, report) = do
|
||||
writeFile p $ show final_m
|
||||
case backend task of
|
||||
Binaryen -> do
|
||||
logger "[INFO] Converting linked IR to binaryen IR"
|
||||
logger "[INFO] Converting linked IR (!) to binaryen IR"
|
||||
Binaryen.setDebugInfo $ if verboseErr task then 1 else 0
|
||||
Binaryen.setOptimizeLevel $ fromIntegral $ optimizeLevel task
|
||||
Binaryen.setShrinkLevel $ fromIntegral $ shrinkLevel task
|
||||
|
@ -18,10 +18,16 @@ In container shell (from `/workspace`)
|
||||
```
|
||||
stack build
|
||||
cd example/test1
|
||||
.github/workflows/setup-deps.sh
|
||||
.github/workflows/boot.sh
|
||||
ahc-link --input-hs Hello.hs --browser --bundle
|
||||
```
|
||||
|
||||
TODO do not use root in container
|
||||
|
||||
TODO do you have to run setup-deps/boot?
|
||||
|
||||
TODO need to setup paths etc in container?
|
||||
|
||||
TODO add Nix env for server (or use alternative)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user