Skip to content

Conversation

@GordonSmith
Copy link
Owner

update ContextLocalStorage LENGTH and adjust related tests refactor cmcpp namespace to cmcpp::spec and update related documentation Implement thread-local storage for context management and update related tests Enhance thread management with new yield and resume functionalities Implement new thread management functions and update related tests Add tests for thread and stream functionalities

  • Implement tests for thread spawning and parallelism checks.
  • Add tests to verify stream cancellation behavior and synchronization.
  • Introduce future-related tests to ensure proper async handling and cancellation.
  • Enhance existing tests to improve coverage and correctness of stream and future operations.

@GordonSmith GordonSmith requested a review from Copilot January 10, 2026 12:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the canonical references to the latest version and refactors the namespace from cmcpp to cmcpp::spec throughout the codebase. It implements thread-local storage for context management and adds comprehensive thread management functionality including yield, resume, and various thread creation operations. Additionally, it enhances stream and future handling with improved cancellation and synchronization support.

Changes:

  • Namespace refactored from cmcpp to cmcpp::spec across all files
  • ContextLocalStorage LENGTH updated from 1 to 2 with thread-local storage implementation
  • New thread management functions added: yield, yield-to, suspend, new-ref/indirect, spawn-ref/indirect, switch-to, available-parallelism, and index
  • Stream and future implementations refactored with improved cancellation and synchronization support

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/wasmtime.cpp Updated namespace references from cmcpp to cmcpp::spec
test/scratchpad.cpp Updated using directive to cmcpp::spec
test/main.cpp Added comprehensive tests for thread operations, context storage, and stream/future cancellation behavior
test/host-util.hpp Updated namespace references and fixed qualified name usage
test/host-util.cpp Updated using directive to cmcpp::spec
samples/wamr/main.cpp Updated namespace and type references
samples/wamr/README.md Updated example code to use fully qualified namespace
ref/component-model Updated submodule commit reference
include/wamr.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/variant.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/util.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/tuple.hpp Changed namespace and added qualified function calls
include/cmcpp/traits.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/string.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/store.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/runtime.hpp Moved ContextLocalStorage definition and added thread management functions
include/cmcpp/lower.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/load.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/list.hpp Changed namespace and updated function calls
include/cmcpp/lift.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/integer.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/func.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/float.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/flags.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/error_context.hpp Changed namespace declaration to cmcpp::spec
include/cmcpp/context.hpp Major refactor of stream/future implementation with thread-local context support
docs/spec-alignment.md New documentation tracking spec alignment and canonical built-ins
README.md Updated all code examples to use cmcpp::spec namespace
CMakeLists.txt Updated install namespace to cmcpp::spec::

@codecov
Copy link

codecov bot commented Jan 10, 2026

Codecov Report

❌ Patch coverage is 82.45614% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.58%. Comparing base (e45fae1) to head (a4d41d9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
include/cmcpp/context.hpp 81.86% 53 Missing and 44 partials ⚠️
include/cmcpp/runtime.hpp 91.42% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
+ Coverage   84.34%   85.58%   +1.23%     
==========================================
  Files          22       22              
  Lines        1476     1873     +397     
  Branches      129      181      +52     
==========================================
+ Hits         1245     1603     +358     
- Misses        141      158      +17     
- Partials       90      112      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GordonSmith GordonSmith requested a review from Copilot January 10, 2026 16:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

@GordonSmith GordonSmith force-pushed the BUMP_REF_DOCS branch 2 times, most recently from 862a446 to bbe220a Compare January 11, 2026 08:23
update ContextLocalStorage LENGTH and adjust related tests
Implement thread-local storage for context management and update related tests
Enhance thread management with new yield and resume functionalities
Implement new thread management functions and update related tests
Add tests for thread and stream functionalities

- Implement tests for thread spawning and parallelism checks.
- Add tests to verify stream cancellation behavior and synchronization.
- Introduce future-related tests to ensure proper async handling and cancellation.
- Enhance existing tests to improve coverage and correctness of stream and future operations.
@GordonSmith GordonSmith merged commit 3513be9 into main Jan 11, 2026
3 of 4 checks passed
@GordonSmith GordonSmith deleted the BUMP_REF_DOCS branch January 11, 2026 09:53
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.

1 participant