Skip to content

TypeError: memory_allocate is not a function #318

@LinusU

Description

@LinusU

It seems like my compiled wasm file doesn't export e.g. memory.allocate. I'm getting the following error when trying to use e.g. newArray(...):

     TypeError: memory_allocate is not a function
      at Object.newArray (node_modules/assemblyscript/lib/loader/index.js:114:15)

Logging out the exported names shows this:

{ memory: Memory [WebAssembly.Memory] {},
  table: Table [WebAssembly.Table] {},
  decodeBmp: [Function: 32] }

(decodeBmp is the function I'm exporting with export function decodeBmp (...) { ... })

I'm probably missing something simple? 🤔 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions