Skip to content

Commit

Permalink
tried the wasmer plan
Browse files Browse the repository at this point in the history
  • Loading branch information
Jian GU committed Oct 10, 2019
1 parent a33e736 commit 6632fe0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "binaryen"]
path = binaryen
url = git://github.com/WebAssembly/binaryen.git
[submodule "wasmer"]
path = wasmer
url = https://github.com/wasmerio/wasmer
9 changes: 9 additions & 0 deletions utils/pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ cmake ..
cmake --build .
```

__wasmer__

```
cd wasmer
make release-llvm
```

__binaryen__

```
Expand All @@ -77,6 +84,8 @@ Python3 >= 3.6

LLVM >= 8.0

Rust (Nightly)

### Note
1. current solution for __`.opt`____`.ll`__ is not so reliable
2. for reference, my env is `llv=9.0.0`, `gcc=9.2.0`, `cmake=3.15.3`
9 changes: 9 additions & 0 deletions utils/pipeline/pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ ext=$(echo $1 | sed 's/^.*\.//')

# export BINARYEN_DEBUG_SOUPERIFY=0

:<<EOF
if [ "${ext}" == "wast" ]; then
echo "### step0 wast2ll \c"
../../wasmer/target/release/wasmer run ${name}.wast --backend=llvm --disable-cache --llvm-pre-opt-ir=${name}.ll
ext='ll'
echo "okay"
fi
EOF

if [ "${ext}" == "wast" ]; then
echo "### step1 wast2wasm \c"
../../wabt/bin/wat2wasm ${name}.wast -o ${name}.wasm
Expand Down
1 change: 1 addition & 0 deletions wasmer
Submodule wasmer added at 88f126

0 comments on commit 6632fe0

Please sign in to comment.