Skip to content

Commit 0b135de

Browse files
committed
WIP
1 parent cd9236a commit 0b135de

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

cabal-wasm-ledger-only.project

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,21 @@ source-repository-package
154154
tag: 1c097a1cafb066b264432e6df27bbc959f3dc715
155155
subdir: contra-tracer
156156

157-
158157
allow-newer:contra-tracer
158+
allow-older: cborg
159+
160+
161+
-- WASM related
162+
163+
source-repository-package
164+
type: git
165+
location: https://github.com/amesgen/cborg
166+
tag: c3b5c696f62d04c0d87f55250bfc0016ab94d800
167+
subdir: cborg
168+
169+
170+
source-repository-package
171+
type: git
172+
location: https://github.com/haskell-wasm/foundation.git
173+
tag: 8e6dd48527fb429c1922083a5030ef88e3d58dd3
174+
subdir: basement

scripts/enable_wasm_toolchain_ledger_only.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@
33

44
source $HOME/.ghc-wasm/env
55

6+
export CONF_CC_OPTS_STAGE2="$CONF_CC_OPTS_STAGE2 -D_WASI_EMULATED_MMAN"
7+
export CONF_GCC_LINKER_OPTS_STAGE2="$CONF_GCC_LINKER_OPTS_STAGE2 -lwasi-emulated-mman"
8+
69
# This should be able to build!
710
# cabal build --project-file=cabal-wasm.project cardano-api-wasm --keep-going
811

9-
cabal install happy
12+
# Check if `happy` is already installed
13+
if ! command -v happy &> /dev/null; then
14+
echo "Happy is not installed. Installing it now..."
15+
cabal install happy
16+
else
17+
echo "Happy is already installed. Skipping installation."
18+
fi
19+
20+
21+
wasm32-wasi-cabal build --project-file=cabal-wasm-ledger-only.project \
22+
cardano-api-wasm-ledger-only
1023

11-
wasm32-wasi-cabal build --project-file=cabal-wasm-ledger-only.project cardano-api-wasm-ledger-only --keep-going
1224

1325
# Hints
1426
# https://github.com/bradrn/brassica/blob/master/BUILDING.md

0 commit comments

Comments
 (0)