Skip to content

Added Emscripten examples #184

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Added Emscripten examples #184

wants to merge 11 commits into from

Conversation

perseoGI
Copy link
Contributor

@perseoGI perseoGI commented Jun 2, 2025

No description provided.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

It is looking good so far.

There are some typos, most don't matter, but the bindigs in the path, better fix it.

tools.build:sharedlinkflags=['-sALLOW_MEMORY_GROWTH=1']

# Set Ninja as default generator as it is faster and will sove issues on Windows
tools.cmake.cmaketoolchain:generator=Ninja
Copy link
Member

Choose a reason for hiding this comment

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

What is the default generator for emcc? Unix/MinGW Makefiles?

@@ -0,0 +1,39 @@
# Note: this profile uses emsdk package from Conan Center Index
Copy link
Member

Choose a reason for hiding this comment

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

Call this profile emcc_base or something like that?


# HEAPxx values need to be exported explicitly since Emscripten 4.0.7
# https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#407---041525
tc.extra_exelinkflags.append(
Copy link
Member

Choose a reason for hiding this comment

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

this is not best practice, as it is hardcoded in recipe for all profiles.
Either this recipe is exclusively for webassembly, or maybe define it elsewhere? I understand that the main.cpp is only for emscripten right now, so maybe a validate() that raises if not emcc?

deps.generate()

tc = CMakeToolchain(self)
tc.extra_exelinkflags.append(
Copy link
Member

Choose a reason for hiding this comment

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

Same as above, either a validate() or the flags go to the profile?

memsharded added a commit to conan-io/conan that referenced this pull request Jun 12, 2025
… + emcc) (#18432)

Changelog: Feature: Added first class citizen emscripten support (new
wasm64 architecture + emcc)
Docs: conan-io/docs#4115
Examples2: conan-io/examples2#184

This PR adds updated support to `wasm` (32 bits) and `asm.js` and
introduces new architecture `wasm64`.
@perseoGI perseoGI changed the title Added WASM examples Added Emscripten examples Jun 12, 2025
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.

2 participants