Repository navigation
Emscripten platform + WebAssembly 32 / 64-bit option - #664
Merged
Merged
Conversation
danoli3
force-pushed
the
emscripten-wasm64
branch
from
October 14, 2026 22:51
7943ac2 to
e793e0a
Compare
…e PROJECT_EMSCRIPTEN_WASM, GUI dropdown
… template for osx/linux; wasm64 label (WASM64) (MEMORY64)
…ECT_EMSCRIPTEN_WASM, read back on update
danoli3
force-pushed
the
emscripten-wasm64
branch
2 times, most recently
from
October 15, 2026 01:21
3fd1e83 to
e977fde
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PG side of openframeworks/openFrameworks#8558 (
PROJECT_EMSCRIPTEN_WASM = 32 | 64inconfig.emscripten.default.mk) and openframeworks/openFrameworks#8586 (CMake, same option name).Emscripten platform
-pemscriptenbuilds on the vscode base (Makefile,.vscode) and overlaysscripts/templates/emscripten(Makefile,config.make,emmake.sh). No desktop platform is needed.emscriptenisn't added toplatformsOptions. That list only drivesallplatformsand the template filter, so adding it would block the template.WebAssembly 32 / 64-bit
-W32/-W64(--emscripten-wasm=64). In the GUI it's the "WebAssembly (Emscripten)" dropdown, under Advanced options:PROJECT_EMSCRIPTEN_WASM = 64toconfig.make.EMSCRIPTEN_MEMORY64line is commented out.config.make. A legacyEMSCRIPTEN_MEMORY64 = 1counts as 64.config.make/CMakeLists.txt. New projects reset to 32.libs/*/lib/emscripten/WASM64exists, PG warns to runBITS=64 scripts/emscripten/download_libs.sh, which replaces the installedlib/emscriptenlibs. The GUI shows the same note.WASMorWASM64, so the two are never mixed.CMake template (openFrameworks#8586)
-tcmake(GUI: Templates → "CMake (CMakeLists.txt)") copiesscripts/templates/cmake/CMakeLists.txtif the project has none. An existing one is kept.CMakeLists.txtthat includes OF'sopenFrameworks.cmake:OF_ROOTdefault is set relative to the project, or absolute when the project is outside OF;set(PROJECT_EMSCRIPTEN_WASM 64)goes before the include (a normal variable, so a stale cached 32 can't override it);scripts/templates/cmake, PG logs a warning.Translations
-k/-Woptions, the GUI fields and the 9 locales were merged by keeping both sides: 161 keys per locale, no duplicates.-pmsys2 -kclangarm64and-pemscripten -W64both still work.Tested
EMSCRIPTEN_MEMORY64 = 1: read as 64;-posx -temscriptenstill works.CMakeLists.txtwas correct, the value was kept on reopen and removed when switched to 32, andOF_ROOTwas absolute for a project outside OF.emcmake cmake+cmake --buildandemmake makeboth buildbin/em/<app>/index.html.lib/emscripten/WASM64and compiles everything with-sMEMORY64=1 -mwasm64. The link then fails on third-party symbols, because there are no wasm64 libs yet. That's expected until apothecary ships real wasm64emscripten_64packages.