-
Notifications
You must be signed in to change notification settings - Fork 2
emsdk: new recipe #4
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
base: main
Are you sure you want to change the base?
Conversation
Greetings @skhaz, I’m excited to share that we have just released conan-2.8, which now includes native support for the In addition, this new repository will serve not only as a recipe index but also as a profile repository. You can check out the documentation available in my branch. For example, take a look at the new wasm32 profile: https://github.com/perseoGI/conan-toolchains/blob/pgi/new/emsdk/conan_config/profiles/emsdk/wasm32. Once this PR is merged, you can easily install these profiles by following the instructions in the README. However, if you'd like to test them right away, you can run the following command: $ conan config install https://github.com/perseoGI/conan-toolchains.git -sf conan_config --args "-b pgi/new/emsdk" If you're currently on version emcc:
# From https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md
# Note: There is no ABI compatibility guarantee between versions
version: [ANY]
libcxx: [null, libstdc++, libstdc++11, libc++]
threads: [null, posix, wasm_workers]
cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23, 26, gnu26]
cstd: [null, 99, gnu99, 11, gnu11, 17, gnu17, 23, gnu23] We’ve also added a new section on Web Assembly in our 2.18 documentation. While it hasn't been released yet, it should be available in about an hour. This section will provide a more detailed explanation of the new compiler model. Thank you! |
@skhaz We will soon also add some examples, you could check them out here |
Thank you so much, I will give a try. |
Apologies for my ignorance, but how would the migration of my profile to WebAssembly work, as shown below? $ cat ~/.conan2/profiles/webassembly
include(default)
[settings]
arch=wasm
os=Emscripten
[tool_requires]
*: emsdk/4.0.10 |
@skhaz no problem at all! This would be a great wasm 32-bit profile:
Notice the usage of Ninja (if you are in windows, its crucial to avoid some compilation issues, and in general, Ninja is a better opcion over Makefile). And the usage of In the docs you could find more information about other architectures such the experimental I hope it helps! |
.github/scripts/.ci_base_profile
Outdated
include(default) | ||
|
||
[conf] | ||
tools.build.cross_building:can_run=True |
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.
this should probably be in the .ci_profile
in the emsdk recipe folder as this affects all recipes built by this script, and I dnt think can_run
is True for all of them
.github/scripts/build_recipes.py
Outdated
"missing", | ||
"--build-test", | ||
f"{recipe_name}/*", | ||
"--build-require", |
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.
This should be configurable per recipe - it's only there to support the test package doing a tool_requires instead
--- | ||
## 🧰 Built-in Profiles | ||
|
||
This repository includes several **pre-configured Conan profiles** designed to make toolchain setup effortless: |
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.
Each "toolchain" should have a readme with tailored instructions - as I would expect this grow in the future.
I would refer to them as "reference" profiles - the ones we test, leaving it up to users to customise before installing. e.g. the "native" one still requires manual configuration, so I'm not sure that's effortless, there's still some use intervention needed in some instances.
we may consider having the profile .zip files as releases - so that a user can do conan config install https://github.com/xxxx/emsdk_profiles_1.0.zip
or something like that - so that they get only what they need
conan_config/profiles/emsdk/native
Outdated
@@ -0,0 +1,15 @@ | |||
[platform_tool_requires] | |||
emsdk/4.0.10 | |||
|
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.
The name "native" can be confusing because "native" usually means the "local cpu architecture".
I would probably go for another name.
This profile seems to assume that all these tools are discoverable in PATH
, otherwise they won't work, other than perhaps in CMake.
Is there a case for adding a PATH in the [buildenv]
section to point to the installation directory, in case it is not in the system PATH?
once again ,a README for this profiles may clarify these questions
generators = "CMakeToolchain", "VirtualBuildEnv" | ||
|
||
def build_requirements(self): | ||
self.tool_requires(self.tested_reference_str) |
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.
I would probably have a test_package
that is a regular requires and tests the post-conditions (e.g. checking emcc
is called, etc)
and a separate, standalone "sample" project that is tested with the profiles in the profiles/emsdk
folder instead. That way we test all the profiles
Thank you so much @perseoGI. Sorry bugging you again, I am just trying to help. Do you know if do I need some extra setup? ERROR: Package 'emsdk/4.0.10' not resolved: Unable to find 'emsdk/4.0.10' in remotes. Ot it is not published yet? cat ~/.conan2/profiles/default
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=17
os=Macos
[replace_tool_requires]
meson/*: meson/[*]
pkgconf/*: pkgconf/[*]
[tool_requires]
!cmake/*: cmake/[>=3 <4]
[conf]
tools.cmake.cmaketoolchain:generator=Ninja cat ~/.conan2/profiles/webassembly
include(default)
[tool_requires]
ninja/[*]
emsdk/4.0.10
[settings]
arch=wasm
build_type=Release
compiler=emcc
compiler.cppstd=17
compiler.libcxx=libc++
compiler.version=4.0.10
os=Emscripten |
Hi @skhaz For the time being - this new repo will be available as a local recipes index and not published to Conan Center - we want the focus of Conan Center to remain on libraries, and treat these (there will be more!) as a separate case - eventually we may make the recipes available in a remote. You'd have to follow these instructions: https://github.com/perseoGI/conan-toolchains/tree/pgi/new/emsdk, however since it has not been merged, you have to do the following:
For the recipe to be available. |
My bad, thank you so much. |
Summary
Original PR conan-io/conan-center-index#27213