Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I cannot upload to WAPM

A topic by Can Durmus created Aug 22, 2022 Views: 146 Replies: 2
Viewing posts 1 to 2
Submitted(+1)

I am trying to upload my game, Crazy Factory, to WAPM using CLI. I created it using AssemblyScript. But when I try to publish it it gives me error:

$~ wapm publish

Error: WASM file "C:\Users\mdurmus19\Desktop\crazy-factory\crazy-factory.wasm" detected as invalid because InvalidWasm { error: "bulk memory support is not enabled (at offset 2882)" }

Anyone knows how to deal with that?

You can find the source code here.

Thanks for your help.

Submitted(+2)

I had the same problem! Change your asconfig.json file contents to:

{
  "entries": [
    "./src/main.ts"
  ],
  "options": {
    "outFile": "build/cart.wasm",
    "runtime": "incremental",
    "importMemory": true,
    "initialMemory": 1,
    "maximumMemory": 1,
    "noExportMemory": true,
    "zeroFilledMemory": true,
    "memoryBase": 6560,
    "use": [
      "seed=src/wasm4/seedHandler",
      "trace="
    ],     
    "disable": "bulk-memory"
  },
  "targets": {
    "release": {
      "optimizeLevel": 3,
      "shrinkLevel": 1,
      "noAssert": true,
      "use": "abort="
    },
    "debug": {
      "debug": true,
      "sourceMap": "http://localhost:4444/cart.wasm.map",
      "use": "abort=src/wasm4/abortHandler"
    }
  }
}
Submitted(+1)

Thank you a lot. It immediately worked!