-
Notifications
You must be signed in to change notification settings - Fork 372
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
Conversation
… + 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`.
examples/cross_build/emscripten.rst
Outdated
[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"] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
examples/cross_build/emscripten.rst
Outdated
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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
examples/cross_build/emscripten.rst
Outdated
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Co-authored-by: James <[email protected]>
Examples2 PR: conan-io/examples2#184
Client PR's:
conan-io/conan#18432
conan-io/conan#18520