-
Notifications
You must be signed in to change notification settings - Fork 8
Enhance WebAssembly output configuration in compile_to_js.sh #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Enhance the WebAssembly compilation script to produce a modularized JavaScript output with additional runtime exports, memory growth support, and optimized settings.
- Switched output from HTML to JS and added more HEAP export methods
- Enabled
MODULARIZE, custom export name, and memory growth - Set environment to web and applied
-O3optimization
Comments suppressed due to low confidence (2)
distributions/JavaScript/compile_to_js.sh:115
- The runtime export names
HEAPI8,HEAPI16, andHEAPI32appear incorrect; they should beHEAPI8,HEAPI16, andHEAPI32to match Emscripten's API.
- -sEXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "HEAPF64", "HEAPF32", "HEAPU8", "HEAPU16", "HEAPU32", "HEAPI8", "HEAPI16", "HEAPI32"]' \
distributions/JavaScript/compile_to_js.sh:117
- [nitpick] Hardcoding the export name to
createModulemay cause conflicts when loading multiple modules; consider makingEXPORT_NAMEconfigurable or namespaced.
- -sEXPORT_NAME="createModule" \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the WebAssembly output configuration for the libamtrack project while updating associated documentation for the R and Python packages. Key changes include:
- Adding a new README for the R plugin.
- Removing outdated references from the Python text README and adding an updated Python wrapper README.
- Refining the emcc command in the JavaScript compile_to_js.sh script with enhanced configuration flags.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| distributions/R/README.md | Added documentation for the new libamtrack R plugin. |
| distributions/Python/pyamtrack/README.txt | Removed outdated references regarding cBinder. |
| distributions/Python/pyamtrack/README.md | Added updated documentation for the legacy Python wrapper. |
| distributions/JavaScript/compile_to_js.sh | Updated the emcc command with additional flags for WebAssembly. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…val of obsolete scripts
…and compilation instructions
…us, features, and requirements for each language-specific package
…tus and repository link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors the JavaScript WebAssembly build and related distribution files. Key changes include removing legacy build scripts (e.g. compile_to_js.sh, trigger_docker_rebuild.sh, parse_headers.py, JS_INSTALL, and associated CMakeLists.txt), updating distribution READMEs, and modifying workflow configurations in the GitHub Actions setup.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| distributions/README.md | New overview and updated structure of libamtrack distributions |
| distributions/JavaScript/compile_to_js.sh | Entire file removed to deprecate legacy WebAssembly build script |
| .github/workflows/* | Removal or modification of workflows related to WebAssembly packaging |
| Other distribution files | New or updated README files reflecting distribution statuses and build instructions |
Comments suppressed due to low confidence (4)
distributions/JavaScript/compile_to_js.sh:1
- The removal of compile_to_js.sh should be accompanied by updated build instructions and documentation to guide users on the new WebAssembly build process.
#!/bin/bash
distributions/JavaScript/trigger_docker_rebuild.sh:1
- Since trigger_docker_rebuild.sh has been removed, please ensure that its intended functionality is now integrated into the updated CI/CD pipeline and that the documentation reflects this change.
#!/bin/bash
distributions/JavaScript/parse_headers.py:1
- The removal of parse_headers.py suggests that function export list generation is now handled differently; please verify that the new mechanism is documented for future maintainers.
import os
.github/workflows/webassembly-reusable.yml:1
- The deletion of the webassembly-reusable.yml workflow requires confirmation that the functionality is fully transitioned into the new workflows; update the CI documentation accordingly.
name: JavaScript Package (WebAssembly)
This pull request includes significant changes related to the removal of WebAssembly support, updates to documentation, and cleanup of unused files. The most important changes include the removal of WebAssembly workflows and scripts, the addition of a new README for JavaScript bindings, and the migration of WebAssembly-related content to a new repository.
WebAssembly Removal:
.github/workflows/main.yml: Removed thejavascript_packagejob that handled WebAssembly builds..github/workflows/webassembly-reusable.yml: Deleted the reusable workflow for building WebAssembly packages.distributions/JavaScript/CMakeLists.txt: Removed the CMake configuration for building WebAssembly bindings.distributions/JavaScript/compile_to_js.sh: Deleted the script for compiling the library to WebAssembly.distributions/JavaScript/JS_INSTALL: Removed the installation instructions for WebAssembly bindings.Documentation Updates:
distributions/JavaScript/README.md: Added a new README indicating that WebAssembly bindings have been moved to a new repository and providing an overview of the JavaScript bindings.distributions/Java/README.md: Added a detailed README for the Java GUI, including prerequisites, compilation steps, and deployment instructions.distributions/Java/README.txt: Removed the old README in favor of the updated Markdown version.