Try   HackMD

ZK WASM Tech setup

  1. Clone and build https://github.com/akashin/zkwasm/
  2. Clone wasmtime update submodules and build it
    • git clone https://github.com/near/wasmtime.git
    • git clone git@github.com:near/wasmtime.git
    • Switch to zkasm-hackaton branch
  3. Clone https://github.com/0xPolygonHermez/zkevm-proverjs/
    • Switch to training branch
    • Run npm install + npm run build
    • You can now test .zkasm files with node test/zkasmtest.js ../zkwasm/data/generated/counter.zkasm -d

Usage

cargo run --features=all-arch -p cranelift-tools --bin=clif-util wasm --target=sparc ../../zkwasm/data/add.wat

Test WAT files come from https://github.com/akashin/zkwasm/tree/main/data

Other useful options:

  • -D prints machine code
  • -p prints Cranelift IR