You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo apt install happy pkgconf libtool make automake autoconf file git wget curl jq unzip zstd tar gzip
17
17
```
18
18
19
+
(`jq`, `unzip`, `zstd`, `wget` and `curl` are needed by ghc-wasm-meta's installer rather than by the build itself, and `happy` is needed by some Haskell dependencies during the build.)
20
+
19
21
#### Installing `ghc` for wasm
20
22
21
23
Then it is necessary to get `ghc` for wasm, and you see how to do that [here](https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta#getting-started-without-nix). At the moment, it is necessary to install a version of `ghc` that has `base <= 4.20`, so I would recommend installing `wasm32-wasi-9.10` like this:
@@ -40,8 +42,18 @@ And that should not return:
40
42
wasm32-wasi-ghc: command not found
41
43
```
42
44
45
+
If the reported version is not 9.10.x, double-check the `FLAVOUR` used above before continuing: with a different `base` version the build will only fail much later, with confusing dependency resolution errors.
46
+
43
47
Then we need to compile three libraries to WASM: `libblst`, `libsodium`, and `libsecp256k1`.
44
48
49
+
The script [`scripts/wasm-without-nix/build-wasm-libs.sh`](../scripts/wasm-without-nix/build-wasm-libs.sh) automates all the steps in this section: it builds the same pinned versions of the libraries as the Nix build, installs them into a prefix of your choice, verifies the results are really wasm, and generates a `cabal.project` fragment that points the build at them. From the root of this repository run:
and then follow the instructions it prints at the end (in particular, exporting `PKG_CONFIG_PATH`). In that case you can skip straight to the [Compiling `cardano-wasm` section](#compiling-cardano-wasm). The rest of this section explains the equivalent manual steps.
56
+
45
57
In order to not interfere with the system library installation, we will create a folder to serve as our prefix:
0 commit comments