Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.1 KB

getting_started.md

File metadata and controls

52 lines (37 loc) · 1.1 KB

Getting Started

Build the compiler

  1. clone the repo

    git clone https://github.com/intel/Wasmnizer-ts.git
  2. install the dependencies

    cd Wasmnizer-ts
    npm install
  3. build

    npm run build

Build ts source code

cd build
node cli/ts2wasm.js --opt=3 <source> -o out.wasm

Build wasm module to AoT module

# 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 the generated module

Source debugging (browser only)

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