Hi!
I'm working on a project that builds a gantt chart, the heavy lifting here is offloaded to a rust wasm plugin.
Now, trying to import this plugin in typst document and I hit the following error when compiling PDF:
error: cannot find definition for import __wbindgen_placeholder__::__wbindgen_describe with type Func(FuncType { params: [I32], results: [] })
┌─ example.typ:3:31
│
3 │ let timeline_plugin = plugin("./target/wasm32-unknown-unknown/release/gantt_purely_rust.wasm")
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I have searched discord and found people are experiencing similar but not exactly the same issues, and I cannot troubleshoot on my own.
I use NixOS, and a self-contained development flake with dependencies is provided. I've tested the example in https://github.com/astrale-sharp/wasm-minimal-protocol/tree/master/examples/hello_rust with the very flake and it did compile both the plugin and the typst document, so I presume I've set the dependencies up properly.
The entire project is available at https://github.com/disbolog/wasm-typst
Thank you!
CC: @clever seal @patent oracle