Skip to content

stdexec: add a new package for stdexec - #30060

Merged
jcar87 merged 6 commits into
conan-io:masterfrom
hollykbuck:master
Nov 12, 2026
Merged

jcar87 merged 6 commits into
conan-io:masterfrom
hollykbuck:master

Conversation

@hollykbuck

@hollykbuck hollykbuck commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changes to recipe: stdexec/2026.03

Motivation

This PR adds stdexec, the reference implementation for P2300 (std::execution).

  • P2300 Support: It is a foundational library for C++ developers to experience the upcoming C++26 Senders/Receivers model today using C++20.
  • Ecosystem Integration: Several modern networking and concurrency libraries (e.g., uring_exec are starting to depend on stdexec. Having it in Conan Center allows these projects to be properly packaged and built without relying on private registries or complex git submodules.
  • Upstream Tag: This initial version targets the latest release tag gtc-2026.

Details

  • New Recipe: Created a new recipe for stdexec.
  • Components Support:
    • stdexec: The core header-only component.
    • system_context: A compiled component required for certain execution contexts (mapped to system_context.cpp in upstream).
  • Compiler Requirements: Enforced C++20 as the minimum standard. Minimum compiler versions are set to GCC 12+, Clang 16+, and MSVC 19.4+ (Visual Studio 17.10+) to ensure robust coroutine and concept support.
  • Build Logic: Since the upstream CMake can be complex for a package manager, this recipe manually handles the compilation of the system_context library and the generation of a version configuration header to ensure consistent behavior across platforms.
  • Platform Specifics: Added specific compile flags for GCC (-fcoroutines) and MSVC (/Zc:__cplusplus) to ensure the library headers work correctly out of the box.

  • Read the contributing guidelines
  • Checked that this PR is not a duplicate: list of PRs by recipe
  • If this is a bug fix, please link related issue or provide bug details
  • Tested locally with at least one configuration using a recent version of Conan

Add a 👍 reaction to pull requests you find important to help the team prioritize, thanks!

@CLAassistant

CLAassistant commented Apr 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@czoido

czoido commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Thanks a lot for packaging stdexec, @hollykbuck, and sorry for the slow review!

While reviewing it, I found a couple of things that would simplify the recipe but need changes upstream, so I opened:

I'll update this thread once there's news from upstream.

@hollykbuck

Copy link
Copy Markdown
Contributor Author

Thanks a lot for packaging stdexec, @hollykbuck, and sorry for the slow review!

While reviewing it, I found a couple of things that would simplify the recipe but need changes upstream, so I opened:

I'll update this thread once there's news from upstream.

I've managed to use the upstream CMakeLists.txt directly. However, I've run into an issue with parallel_scheduler involving a weak symbol resolution problem:

// include/stdexec/__detail/__parallel_scheduler_replacement_api.hpp:41
__attribute__((weak))
backend* query_parallel_scheduler_backend();

When the parallel_scheduler feature is enabled, the default implementation of this weak symbol is not pulled in by ld into the final artifact. Consequently, calling get_parallel_scheduler()—which internally invokes query_parallel_scheduler_backend()—results in a segmentation fault.
The header-only build works fine, but linking against libparallel_scheduler.a causes a segfault on Linux. I'm fairly certain this is an upstream issue: either upstream fixes this, or the recipe might have to remain strictly header-only.

@czoido

czoido commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Hi @hollykbuck,

Thanks for digging into this. I could reproduce it on Linux too, and I agree it's an upstream issue.
Since you found it, would you mind opening an issue in NVIDIA/stdexec? In the meantime, probably keeping the recipe header-only is the best, and we can add the option back once it's fixed upstream.
Also, let's see if they can tag the version NVIDIA/stdexec#2342

Edit: In the end I kept the with_parallel_scheduler option with False as the default, like upstream. The default package is header-only, and with the option on it behaves the same as upstream's own build. The segfault is tracked in NVIDIA/stdexec#2128, and the fix is pending in NVIDIA/stdexec#2104.

@czoido

czoido commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Hi @hollykbuck, thanks a lot for this recipe and for iterating on it. Now that stdexec has tagged v0.11.0, I pushed a commit on top of your branch with these changes:

  • The recipe packages 0.11.0 from the tag instead of the cci snapshot. The tag already includes Initialize CPM and fetch icm only when they are needed NVIDIA/stdexec#2341.
  • rapids-cmake is now v24.02.00, the version upstream fetches by default (cmake/RAPIDS.cmake#L21-L24).
  • with_parallel_scheduler defaults to False, the same default as upstream's STDEXEC_BUILD_PARALLEL_SCHEDULER.
  • The STDEXEC::system_context alias is gone. Upstream's installed config only exports STDEXEC::stdexec and STDEXEC::parallel_scheduler.
  • STDEXEC_BUILD_CLANGD_HELPER is off. This option is new in v0.11.0 and only builds a translation unit for clangd (CMakeLists.txt#L645-L650).

Thanks again!

@jcar87
jcar87 merged commit 3eba85c into conan-io:master Nov 12, 2026
7 checks passed
ottmar-zittlau pushed a commit to ottmar-zittlau/conan-center-index that referenced this pull request Nov 16, 2026
* stdexec: add a new package for stdexec

* stdexec: rework recipe to use upstream CMake install

* stdexec: use v0.11.0 tag, disable parallel scheduler by default

* final fixes

* minor fixes

* minor changes

---------

Co-authored-by: Carlos Zoido <[email protected]>
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.

4 participants