How do I build Bokeh extension with wasm depencency?

Hi Bokeh Community

I’m trying to build a Bokeh extension for VegaFusion here MarcSkovMadsen/panel-vegafusion.

The current branch can be explored via

To build the Bokeh extension I need to include the vegafusion-wasm - npm package. It includes a .wasm module. You can inspect all files here UNPKG - vegafusion-wasm.

Unfortunately I cannot bokeh build the extension as I get an unsupported extension error?

How do I bokeh build this extension?


[email protected]:~/src/panel_vegafusion$ bokeh build
Working directory: /home/jovyan/src/panel_vegafusion
New development environment. Running npm install.
npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but package-lock.json was generated for [email protected] I'll try to do my best with it!
npm WARN [email protected] No description

added 122 packages from 94 contributors and audited 122 packages in 18.04s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Using /home/jovyan/src/panel_vegafusion/tsconfig.json
Compiling styles
Compiling TypeScript (3 files)
Linking modules
Error: unsupported extension of /home/jovyan/src/panel_vegafusion/node_modules/vegafusion-wasm/vegafusion_wasm_bg.wasm
    at /srv/conda/envs/notebook/lib/python3.7/site-packages/bokeh/server/static/js/compiler.js:170912:31
    at Linker.new_module (/srv/conda/envs/notebook/lib/python3.7/site-packages/bokeh/server/static/js/compiler.js:170914:15)
    at Linker.resolve (/srv/conda/envs/notebook/lib/python3.7/site-packages/bokeh/server/static/js/compiler.js:171055:37)
    at (/srv/conda/envs/notebook/lib/python3.7/site-packages/bokeh/server/static/js/compiler.js:170637:36)
    at build (/srv/conda/envs/notebook/lib/python3.7/site-packages/bokeh/server/static/js/compiler.js:169312:50)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async main (/srv/conda/envs/notebook/lib/python3.7/site-packages/bokeh/server/static/js/compiler.js:203:32)

Reproduce on Binder

Just for info, I have found a “workaround” not using “bokeh extensions” and “bokeh build”.

I have used Panels ReactiveHTML and built a .js package seperately.

It would still be “nice to know” how to bokeh build extensions with wasm depencies.

I don’t think anyone knows this, as far as I know you are the first person to try. @mateusz is certainly the best person to offer technical comments, and your best best to engage him is probably to open a GitHub development discussion.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.