-
clone the repo
git clone https://github.com/intel/Wasmnizer-ts.git
-
install the dependencies
cd Wasmnizer-ts npm install
-
build
npm run build
cd build
node cli/ts2wasm.js --opt=3 <source> -o out.wasm
# Build WAMR AoT compiler
cd runtime-library/deps/wamr-gc/wamr-compiler
## Follow the instructions in the README.md to build wamrc (please add -DWAMR_BUILD_GC_BINARYEN=1 during cmake configuration)
# Generate AoT module
/path/to/wamrc --enable-gc -o out.aot out.wasm
Please refer to developer guide for feature description.
-
Execute on WAMR
Refer to iwasm_gc
To debug the generated wasm module, use --debug --sourceMap
command line options to generate wasm module containing source map.
node cli/ts2wasm.js <source> -o out.wasm --debug --sourceMap