0

In my AssemblyScript project, I have the following configuration:

{
  "targets": {
    "debug": {
      "outFile": "build/debug.wasm",
      "textFile": "build/debug.wat",
      "sourceMap": true,
      "debug": true
    },
    "release": {
      "outFile": "build/release.wasm",
      "textFile": "build/release.wat",
      "sourceMap": true,
      "optimizeLevel": 3,
      "shrinkLevel": 0,
      "converge": false,
      "noAssert": false
    }
  },
  "options": {
    "bindings": "esm"
  }
}

Based on the interface documentation, I expected the exportRuntime flag to result in a __collect function being included in the exports of the generated bindings:

import { myFunction, __collect } from 'my-package';

myFunction();
__collect(); // undefined!

However, I don't see any such function in the bindings, and no errors appear during a build. There is no __collect export. Have I misunderstood how the minimal runtime works, or configured this incorrectly?


Hopefully I've included all necessary context here, but the rest of the project's code can be found at https://github.com/donmccurdy/keyframe-resample/blob/main/asconfig.json.

Don McCurdy
  • 10,975
  • 2
  • 37
  • 75

0 Answers0