Skip to content

Commit

Permalink
Build more tools
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed May 6, 2024
1 parent 465f6ba commit 04082b7
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 3 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ jobs:
- name: "Test binaryen.js"
run: |
node ./tests/sanity
- name: "Build wasm-shell"
run: |
cd ./binaryen/build
source $HOME/emsdk/emsdk_env.sh
emcc --version
emmake make $MAKE_FLAGS wasm-shell
echo '#!/usr/bin/env node' | cat - ./bin/wasm-shell.js > ../../bin/wasm-shell
cd ../..
- name: "Test wasm-shell"
run: |
node ./bin/wasm-shell --help
- name: "Build wasm-opt"
run: |
cd ./binaryen/build
Expand All @@ -99,6 +110,17 @@ jobs:
- name: "Test wasm-opt"
run: |
node ./bin/wasm-opt --help
- name: "Build wasm-metadce"
run: |
cd ./binaryen/build
source $HOME/emsdk/emsdk_env.sh
emcc --version
emmake make $MAKE_FLAGS wasm-metadce
echo '#!/usr/bin/env node' | cat - ./bin/wasm-metadce.js > ../../bin/wasm-metadce
cd ../..
- name: "Test wasm-metadce"
run: |
node ./bin/wasm-metadce --help
- name: "Build wasm2js"
run: |
cd ./binaryen/build
Expand All @@ -110,6 +132,61 @@ jobs:
- name: "Test wasm2js"
run: |
node ./bin/wasm2js --help
- name: "Build wasm-as"
run: |
cd ./binaryen/build
source $HOME/emsdk/emsdk_env.sh
emcc --version
emmake make $MAKE_FLAGS wasm-as
echo '#!/usr/bin/env node' | cat - ./bin/wasm-as.js > ../../bin/wasm-as
cd ../..
- name: "Test wasm-as"
run: |
node ./bin/wasm-as --help
- name: "Build wasm-dis"
run: |
cd ./binaryen/build
source $HOME/emsdk/emsdk_env.sh
emcc --version
emmake make $MAKE_FLAGS wasm-dis
echo '#!/usr/bin/env node' | cat - ./bin/wasm-dis.js > ../../bin/wasm-dis
cd ../..
- name: "Test wasm-dis"
run: |
node ./bin/wasm-dis --help
- name: "Build wasm-ctor-eval"
run: |
cd ./binaryen/build
source $HOME/emsdk/emsdk_env.sh
emcc --version
emmake make $MAKE_FLAGS wasm-ctor-eval
echo '#!/usr/bin/env node' | cat - ./bin/wasm-ctor-eval.js > ../../bin/wasm-ctor-eval
cd ../..
- name: "Test wasm-ctor-eval"
run: |
node ./bin/wasm-ctor-eval --help
- name: "Build wasm-reduce"
run: |
cd ./binaryen/build
source $HOME/emsdk/emsdk_env.sh
emcc --version
emmake make $MAKE_FLAGS wasm-reduce
echo '#!/usr/bin/env node' | cat - ./bin/wasm-reduce.js > ../../bin/wasm-reduce
cd ../..
- name: "Test wasm-reduce"
run: |
node ./bin/wasm-reduce --help
- name: "Build wasm-merge"
run: |
cd ./binaryen/build
source $HOME/emsdk/emsdk_env.sh
emcc --version
emmake make $MAKE_FLAGS wasm-merge
echo '#!/usr/bin/env node' | cat - ./bin/wasm-merge.js > ../../bin/wasm-merge
cd ../..
- name: "Test wasm-merge"
run: |
node ./bin/wasm-merge --help
- name: "Push changes to GitHub"
if: github.event_name == 'schedule' && matrix.emsdk == 'tot'
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ or you can use one of the [previous versions](https://github.com/AssemblyScript/

### Command line

The package includes Node.js builds of [wasm-opt](https://github.com/WebAssembly/binaryen#wasm-opt) and [wasm2js](https://github.com/WebAssembly/binaryen#wasm2js).
The package includes Node.js builds of [Binaryen's command line tools](https://github.com/WebAssembly/binaryen#tools): `wasm-shell`, `wasm-opt`, `wasm-metadce`, `wasm2js`, `wasm-as`, `wasm-dis`, `wasm-ctor-eval`, `wasm-reduce` and `wasm-merge`.

API
---
Expand Down
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@
"main": "index.js",
"typings": "index.d.ts",
"bin": {
"wasm-shell": "bin/wasm-shell",
"wasm-opt": "bin/wasm-opt",
"wasm2js": "bin/wasm2js"
"wasm-metadce": "bin/wasm-metadce",
"wasm2js": "bin/wasm2js",
"wasm-as": "bin/wasm-as",
"wasm-dis": "bin/wasm-dis",
"wasm-ctor-eval": "bin/wasm-ctor-eval",
"wasm-reduce": "bin/wasm-reduce",
"wasm-merge": "bin/wasm-merge"
},
"scripts": {
"readme": "doctoc README.md --github --title \"### Contents\"",
Expand All @@ -31,8 +38,15 @@
"package-lock.json",
"README.md",
"bin/package.json",
"bin/wasm-shell",
"bin/wasm-opt",
"bin/wasm2js"
"bin/wasm-metadce",
"bin/wasm2js",
"bin/wasm-as",
"bin/wasm-dis",
"bin/wasm-ctor-eval",
"bin/wasm-reduce",
"bin/wasm-merge"
],
"devDependencies": {
"dateformat": "^5.0.2",
Expand Down

0 comments on commit 04082b7

Please sign in to comment.