Added Emscripten documentation#4115
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.
Why this is commented? When it is necessary?
Maybe better to keep it simple and remove it?
There was a problem hiding this comment.
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.
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.
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.
Is asm.js kind of deprecated, superseded by Wasm already?
There was a problem hiding this comment.
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 <memsharded@gmail.com>
Examples2 PR: conan-io/examples2#184
Client PR's:
conan-io/conan#18432
conan-io/conan#18520