Skip to content

Added Emscripten documentation #4115

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

Merged
merged 10 commits into from
Jun 30, 2025
Merged

Conversation

perseoGI
Copy link
Contributor

@perseoGI perseoGI commented Jun 4, 2025

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`.
@czoido czoido added this to the 2.18 milestone Jun 25, 2025
[conf]
tools.build:compiler_executables={'c':'/path/to/emcc', 'cpp':'/path/to/em++'}
# Add native Emscripten toolchain
# tools.cmake.cmaketoolchain:user_toolchain=["/path/to/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"]
Copy link
Member

Choose a reason for hiding this comment

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

Why this is commented? When it is necessary?
Maybe better to keep it simple and remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okey I'll remove it. The reason of adding this line derives from a conan issue where the user found out that adding that extra toolchain fixed a problem he has while using its native installation of emsdk.
This is not necessary when using our packaged emsdk

Comment on lines 153 to 157
Also, when requiring ``emsdk`` package as a tool, it is recommended to use it this way:

.. code-block:: python

self.tool_requires("emsdk/[*]", package_id_mode="patch_mode")
Copy link
Member

Choose a reason for hiding this comment

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

Not great, adding this in recipes is not the best approach, better keep the tool-requires in profiles only

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I'll remove it

What’s the difference between asm.js and WASM?
----------------------------------------------

- **asm.js** is a subset of JavaScript optimized for speed. It is fully supported by all browsers (even older ones) and compiles to a large ``.js`` file.
Copy link
Member

Choose a reason for hiding this comment

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

Is asm.js kind of deprecated, superseded by Wasm already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it is still used so seems reasonable to add the docs for it. But I'll move it to a secondary position to make WASM more relevant

@czoido czoido merged commit 810316b into conan-io:develop2 Jun 30, 2025
2 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.

3 participants