Skip to content

Np 1250 create emscripten binding#5

Merged
HellAholic merged 18 commits intomainfrom
NP-1250-create-emscripten-binding
Jan 27, 2026
Merged

Np 1250 create emscripten binding#5
HellAholic merged 18 commits intomainfrom
NP-1250-create-emscripten-binding

Conversation

@saumyaj3
Copy link
Copy Markdown
Contributor

@saumyaj3 saumyaj3 commented Dec 12, 2025

NP-1250

- Added support for building JavaScript bindings through Emscripten.
- Introduced `WITH_JS_BINDINGS` option in CMake for enabling/disabling JS bindings.
- Updated `conanfile.py` to include new options, dependencies, and packaging logic for `UvulaJS`.
- Integrated `UvulaJS` bindings for import/export with TypeScript support.
- Modified GitHub actions to support WebAssembly (`platform_wasm`) and npm package workflows.

NP-1250
Copy link
Copy Markdown
Contributor

@casperlamboo casperlamboo left a comment

Choose a reason for hiding this comment

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

For both the unwrapTyped and projectTyped function I have two similar remarks. They both return a emscripten::val which is untyped when integrated in a host platform. This seems counter to the comments around. Additionally I see you use std::vector<T> as arguments. Using cpp vectors in typescript is hella annoying. In neoprep we've often opted to just accept javascript lists and perform the conversion in cpp.

Comment thread UvulaJS/UvulaJS.cpp Outdated
- Replaced custom structures with standardized TypeScript-like types (Float32Array, Uint32Array, Int32Array).
- Refactored wrappers and return types to improve type safety in TypeScript.
- Enhanced `project` and `unwrap` methods with new structured return types.
- Updated Emscripten bindings to support TypeScript-friendly structures and arrays.

NP-1250
Comment thread UvulaJS/UvulaJS.cpp Outdated
- Introduced `PolygonArray` class to wrap arrays for improved TypeScript typing.
- Replaced `std::vector` with `Float32Array` and `PolygonArray` in key data structures.
- Enhanced `unwrap` and `project` methods to utilize TypeScript-friendly return types.
- Updated Emscripten bindings to register `PolygonArray` and support structured data types.

NP-1250
…llocation

- Disabled multithreading for Emscripten/WASM builds.
- Simplified `TaskGroup` allocation logic.

NP-1250
Copy link
Copy Markdown
Contributor

@casperlamboo casperlamboo left a comment

Choose a reason for hiding this comment

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

Was working with libUvula bindings and found these remarks

Comment thread UvulaJS/UvulaJS.cpp Outdated
Comment thread UvulaJS/UvulaJS.cpp
@HellAholic HellAholic merged commit ce96a8a into main Jan 27, 2026
6 checks passed
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.

4 participants