Skip to content

Conversation

Copy link

Copilot AI commented Sep 5, 2025

This PR adds support for building vbjax packages for WebAssembly environments using emscripten-forge, enabling deployment in web-based Jupyter environments like JupyterLite with xeus-python kernels.

Changes Made

  • environment-wasm-build.yml: Conda environment specification for emscripten builds with all necessary dependencies
  • .github/workflows/emscripten-forge-build.yml: GitHub Action workflow that automatically builds vbjax for the emscripten-wasm32 platform using rattler-build
  • WASM_BUILD.md: Documentation explaining the WebAssembly build process, current limitations, and usage instructions
  • README.md: Added WebAssembly support section with clear limitation warnings

Technical Implementation

The workflow uses rattler-build to create conda packages for the emscripten-wasm32 platform. It includes:

  • Smart version extraction from _version.py or Git tags
  • Proper handling of dependencies (numpy, scipy) while acknowledging JAX limitations
  • Artifact uploading for distribution
  • Minimal testing that avoids JAX import issues

Current Limitations

⚠️ Important: JAX and JAXlib do not currently have full WebAssembly support in emscripten environments. This build:

  • ✅ Creates a valid conda package structure
  • ✅ Can be distributed via emscripten-forge
  • ✅ Can be installed in xeus-python kernels
  • ❌ Has limited functionality until JAX WebAssembly support improves

Future Benefits

As JAX WebAssembly support matures, this infrastructure will enable:

  • Full vbjax functionality in web browsers
  • Integration with JupyterLite deployments
  • Browser-based neural mass modeling and simulation

The build configuration is designed to be easily updated when JAX WebAssembly compatibility improves.

Fixes #88.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/emscripten-forge/recipes/contents/.github/workflows
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Author

Copilot AI commented Sep 5, 2025

@maedoc 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI changed the title [WIP] add emscripten-forge build Add emscripten-forge build support for WebAssembly deployment Sep 5, 2025
Copilot AI requested a review from maedoc September 5, 2025 15:43
Copilot finished work on behalf of maedoc September 5, 2025 15:43
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.

add emscripten-forge build

2 participants