#wasm plugin: can't find definition

3 messages · Page 1 of 1 (latest)

mild lion
#

I'm trying to make a wasm plugin and I'm getting this error:

error: cannot find definition for import __wbindgen_externref_xform__::__wbindgen_externref_table_grow with type Func(FuncType { params: [I32], results: [I32] })
  ┌─ @local/banners:1.0.0/src/lib.typ:1:28
  │
1 │ #let banner-plugin = plugin("typst_banners.wasm")
  │                             ^^^^^^^^^^^^^^^^^^^^

help: error occurred while importing this module
  ┌─ a.typ:1:8
  │
1 │ #import "@local/banners:1.0.0": *
  │         ^^^^^^^^^^^^^^^^^^^^^^

is there a wasm import that typst is missing or something? can I avoid using it with some compiler flag? (I'm using rust to write the wasm module)

mild lion
#

it seems like something is using wasm's externref, and the rust file for that imports those functions

#

I'm not exactly sure what is, though