Skip to content

Commit 35e4215

Browse files
committed
Regenerate wat files from C sources and add helper script to do so while preserving license headers
1 parent 81e450d commit 35e4215

File tree

6 files changed

+26797
-28077
lines changed

6 files changed

+26797
-28077
lines changed
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
## Benchmark generation
22

3-
The `wat` files in this folder were generated from the provided C sources (which are included for reproducibility). To re-generate the `wat` files, one has to use the `clang` compiler contained in the `wasi-sdk` and `wasm2wat` from WABT. Follow the instructions in [the WASM README.](../../README.md)
4-
5-
And then proceed by running the following commands:
3+
The `wat` files in this folder were generated from the provided C sources (which are included for reproducibility). To re-generate the `wat` files, you can use the provided `regenerate_wat.sh` script. First, ensure that `WASI_SDK` and `WABT_DIR` are set in your environment, then run:
64
```
7-
$WASI_SDK/bin/clang -Wl,--export="run" -O3 -o richards.wasm richards.c
8-
$WABT_DIR/wasm2wat -o richards.wat richards.wasm
5+
./regenerate_wat.sh
96
```
7+
This script uses `clang` from `WASI_SDK` and `wasm2wat` from `WABT_DIR` to regenerate all `.wat` files from the C sources.
108

11-
In the case of `sieve`, an additional linker flag must be passed to clang, since the default stack size (64kb) is too small.
12-
```
13-
$WASI_SDK/bin/clang -Wl,-export="run" -Wl,-z,stack-size=4194304 -O3 -o sieve.wasm sieve.c
14-
$WABT_DIR/wasm2wat -o sieve.wat sieve.wasm
15-
```
9+
Follow the instructions in [the WASM README.](../../README.md)

0 commit comments

Comments
 (0)