Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f8473f0
Implement Emscripten support with JavaScript bindings for `UvulaJS`
saumyaj3 Dec 12, 2025
1737a91
Update GitHub workflow naming: `conan-package.yml` → `package.yml`
saumyaj3 Dec 12, 2025
d3f77fe
Fix workflow path trigger in package.yml to include correct location
saumyaj3 Dec 12, 2025
77e4a0d
Refactor UvulaJS JavaScript bindings for TypeScript integration
saumyaj3 Dec 16, 2025
02cb395
Expand GitHub Actions path triggers in `package.yml` to include `Uvul…
saumyaj3 Dec 16, 2025
3288882
Refactor `UvulaJS` bindings to enhance TypeScript compatibility
saumyaj3 Dec 16, 2025
2422f59
Add Emscripten-specific threading configuration and refactor memory a…
saumyaj3 Dec 16, 2025
d46eaba
Simplify bindings
casperlamboo Jan 11, 2026
8c483b0
Transpose camera matrix
casperlamboo Jan 12, 2026
229a2da
Merge branch 'main' into NP-1250-create-emscripten-binding-II
saumyaj3 Jan 12, 2026
63a340d
Merge remote-tracking branch 'origin/NP-1250-create-emscripten-bindin…
casperlamboo Jan 13, 2026
7081897
Merge pull request #6 from Ultimaker/NP-1250-create-emscripten-bindin…
casperlamboo Jan 13, 2026
202d95c
Construct `Float32Array` to return uv coords
casperlamboo Jan 14, 2026
2516aad
Move vertices in `Geometry` container
casperlamboo Jan 14, 2026
a315f3a
Merge pull request #8 from Ultimaker/NP-1250-create-emscripten-bindin…
casperlamboo Jan 15, 2026
6332d8b
Fix js bindings so we can provide a `const Geometry&` in `project` fu…
casperlamboo Jan 15, 2026
cf3190e
Merge branch 'refs/heads/NP-1250-create-emscripten-binding-III' into …
casperlamboo Jan 15, 2026
35aed92
Fix Python binding
wawanbreton Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: conan-package
name: package

on:
push:
Expand All @@ -10,11 +10,13 @@ on:
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/conan-package.yml'
- '.github/workflows/package.yml'
- 'UvulaJS/**'
branches:
- main
- master
- 'CURA-*'
- 'NP-*'
- 'PP-*'
- '[0-9].[0-9]*'
- '[0-9].[0-9][0-9]*'
Expand All @@ -25,4 +27,13 @@ on:
jobs:
conan-package:
uses: ultimaker/cura-workflows/.github/workflows/conan-package.yml@main
with:
platform_wasm: true
secrets: inherit

npm-package:
needs: [ conan-package ]
uses: ultimaker/cura-workflows/.github/workflows/npm-package.yml@main
with:
package_version_full: ${{ needs.conan-package.outputs.package_version_full }}
secrets: inherit
20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ if (WITH_PYTHON_BINDINGS)
message(STATUS "Configuring pyUvula version: ${PYUVULA_VERSION}")
endif ()

option(WITH_JS_BINDINGS "Build with JavaScript/Emscripten bindings: `UvulaJS`" OFF)
if (WITH_JS_BINDINGS)
message(STATUS "Configuring UvulaJS with Emscripten bindings")
endif ()

if (NOT DEFINED UVULA_VERSION)
message(FATAL_ERROR "UVULA_VERSION is not defined!")
endif ()
Expand Down Expand Up @@ -51,8 +56,14 @@ target_compile_definitions(libuvula
UVULA_VERSION="${UVULA_VERSION}"
)

use_threads(libuvula)
enable_sanitizers(libuvula)
if(NOT EMSCRIPTEN)
use_threads(libuvula)
endif()
if(EMSCRIPTEN)
# Skip sanitizers and threading for Emscripten builds to avoid shared memory issues
else()
enable_sanitizers(libuvula)
endif()
if (${EXTENSIVE_WARNINGS})
set_project_warnings(libuvula)
endif ()
Expand All @@ -62,6 +73,11 @@ if (WITH_PYTHON_BINDINGS)
add_subdirectory(pyUvula)
endif ()

# --- Setup JavaScript/Emscripten bindings ---
if (WITH_JS_BINDINGS)
add_subdirectory(UvulaJS)
endif ()

# --- Setup command line interface (for testing purposes) ---
if (WITH_CLI)
add_subdirectory(cli)
Expand Down
16 changes: 16 additions & 0 deletions UvulaJS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
add_executable(uvula_js UvulaJS.cpp)
target_link_options(uvula_js
PUBLIC
"SHELL:-s USE_ES6_IMPORT_META=1"
"SHELL:-s FORCE_FILESYSTEM=1"
"SHELL:-s EXPORT_NAME=uvula"
"SHELL:-s MODULARIZE=1"
"SHELL:-s EXPORT_ES6=1"
"SHELL:-s SINGLE_FILE=1"
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
"SHELL:-s ERROR_ON_UNDEFINED_SYMBOLS=0"
"SHELL:--bind"
"SHELL:-l embind"
"SHELL: --emit-tsd uvula_js.d.ts"
)
target_link_libraries(uvula_js PUBLIC libuvula)
Loading
Loading