Skip to content

WASM Backend and Bindings#101

Merged
claytonwramsey merged 6 commits intoKavrakiLab:mainfrom
CoMMALab:wasm
Apr 7, 2026
Merged

WASM Backend and Bindings#101
claytonwramsey merged 6 commits intoKavrakiLab:mainfrom
CoMMALab:wasm

Conversation

@zkingston
Copy link
Copy Markdown
Collaborator

@zkingston zkingston commented Mar 21, 2026

Adds a WASM target and bindings for VAMP, enabling use through Javascript in browser applications. Because of this, I also reorganized the architecture specific backends into an isa/ folder, and the bindings into separate python/ and wasm/ folders.

Copy link
Copy Markdown
Member

@claytonwramsey claytonwramsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main thing to do is also get CI coverage so that we don't inevitably break this in the future! otherwise LGTM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should blender edits be a separate pr?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was necessary for three.js visualization, but I can remove and PR separately.

Comment thread README.md
@claytonwramsey
Copy link
Copy Markdown
Member

claytonwramsey commented Apr 6, 2026

looks like some issues with Python dependency specification when building on my end:

~/p/vamp (wasm|✔) $ emcmake cmake -Bbuild-wasm -DCMAKE_BUILD_TYPE=Release -DVAMP_BUILD_WASM=ON
emcmake: cmake -Bbuild-wasm -DCMAKE_BUILD_TYPE=Release -DVAMP_BUILD_WASM=ON -DCMAKE_TOOLCHAIN_FILE=/home/clayton/projects/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/home/clayton/projects/emsdk/node/22.16.0_64bit/bin/node in directory /home/clayton/projects/vamp
-- CPM: Adding package Eigen3@3.4.0 (3.4.0)
-- Populating eigen3
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/clayton/projects/vamp/build-wasm/_deps/eigen3-subbuild
[ 11%] Creating directories for 'eigen3-populate'
[ 22%] Performing download step (download, verify and extract) for 'eigen3-populate'
-- Downloading...
   dst='/home/clayton/projects/vamp/build-wasm/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-3.4.0.tar.gz'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz'
-- Downloading... done
-- extracting...
     src='/home/clayton/projects/vamp/build-wasm/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-3.4.0.tar.gz'
     dst='/home/clayton/projects/vamp/build-wasm/_deps/eigen3-src'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 33%] No update step for 'eigen3-populate'
[ 44%] No patch step for 'eigen3-populate'
[ 55%] No configure step for 'eigen3-populate'
[ 66%] No build step for 'eigen3-populate'
[ 77%] No install step for 'eigen3-populate'
[ 88%] No test step for 'eigen3-populate'
[100%] Completed 'eigen3-populate'
[100%] Built target eigen3-populate
-- CPM: Adding package nigh@0 (97130999440647c204e0265d05a997dbd8da4e70)
-- CPM: Adding package pdqsort@0 (b1ef26a55cdb60d236a5cb199c4234c704f46726)
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Python (missing: Python_INCLUDE_DIRS Development.Module)
  (found suitable version "3.13.12", minimum required is "3.8")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindPython/Support.cmake:4002 (find_package_handle_standard_args)
  /usr/share/cmake/Modules/FindPython.cmake:631 (include)
  cmake/Python.cmake:6 (find_package)
  CMakeLists.txt:90 (include)

Looks like it's caused by option(VAMP_BUILD_PYTHON_BINDINGS "Build VAMP Python bindings" ON), so CMake always tries to build the Python bindings. Instead running emcmake cmake -Bbuild-wasm -DCMAKE_BUILD_TYPE=Release -DVAMP_BUILD_WASM=ON -DVAMP_BUILD_PYTHON_BINDINGS=OFF succeeds.

@zkingston
Copy link
Copy Markdown
Collaborator Author

I'll update the README with the Python bindings off.

Copy link
Copy Markdown
Member

@claytonwramsey claytonwramsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@claytonwramsey claytonwramsey merged commit 05b1e91 into KavrakiLab:main Apr 7, 2026
8 checks passed
@zkingston zkingston deleted the wasm branch April 7, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants