Skip to content

feat(wintertc): migrate structuredClone, queueMicrotask and timers from boa_runtime#5419

Merged
jedel1043 merged 4 commits into
boa-dev:mainfrom
KaustubhOG:feat/wintertc-migrate-microtask
Jul 24, 2026
Merged

feat(wintertc): migrate structuredClone, queueMicrotask and timers from boa_runtime#5419
jedel1043 merged 4 commits into
boa-dev:mainfrom
KaustubhOG:feat/wintertc-migrate-microtask

Conversation

@KaustubhOG

@KaustubhOG KaustubhOG commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary
Continues the boa_runtime -> boa_wintertc migration started with atob/btoa (#5418),moving three more modules with the same move + re-export pattern. Code lives only inboa_wintertc; boa_runtime re-exports it (public paths unchanged) and the *Extension structs delegate.

Changes

  • structuredClone: clone -> boa_wintertc::clone. Its store dependency (JsValueStore) also moves to boa_wintertc::store, since boa_wintertc cannot depend on boa_runtime. store stays public and is re-exported, so boa_runtime::message keeps compiling. rustc-hash moves with it.
  • queueMicrotask: microtask -> boa_wintertc::microtask.
  • timers: interval -> boa_wintertc::timers (renamed to its TC55 category). Re-exported as pub use boa_wintertc::timers as interval, so boa_runtime::interval (incl. clear_all, used by the WPT harness) is unchanged.

Notes / deviations

  • store is a non-TC55 helper that is now public in boa_wintertc. Net public surfac across both crates is unchanged (it was already public in boa_runtime); happy to make it pub(crate) once message also migrates.
  • The queueMicrotask unit test now records order in a global array instead of console,since console is still a stub in boa_wintertc.

@github-actions github-actions Bot added the Waiting On Review Waiting on reviews from the maintainers label Jul 1, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone Jul 1, 2026
@github-actions github-actions Bot added the C-Tests Issues and PRs related to the tests. label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,125 53,125 0
Passed 51,073 51,073 0
Ignored 1,482 1,482 0
Failed 570 570 0
Panics 0 0 0
Conformance 96.14% 96.14% 0.00%

Tested main commit: 5718cc81111ceff12d6054ab948146a45bc6e114
Tested PR commit: 1df7842086a72f1e5f131fdbfdcc19f14719a3f9
Compare commits: 5718cc8...1df7842

Move the structuredClone implementation and its supporting JsValueStore
serialization core (the store module) from boa_runtime into boa_wintertc,
following the same move-and-re-export pattern used for atob/btoa (boa-dev#5418).

- core/runtime/src/clone and core/runtime/src/store are deleted; the code
  now lives only in boa_wintertc.
- boa_runtime re-exports both (pub use boa_wintertc::{clone, store}) so the
  public paths boa_runtime::clone and boa_runtime::store are unchanged, and
  boa_runtime::message keeps compiling against crate::store.
- StructuredCloneExtension delegates to boa_wintertc::clone::register.
- rustc-hash moves with store into boa_wintertc's dependencies; runtime keeps
  it because console still uses it.

store must be public in boa_wintertc so boa_runtime can re-export it for the
message module; net public surface across both crates is unchanged.
Move the queueMicrotask implementation from boa_runtime into boa_wintertc,
following the move-and-re-export pattern used for atob/btoa (boa-dev#5418).

- core/runtime/src/microtask is deleted; the code now lives only in
  boa_wintertc.
- boa_runtime re-exports it (pub use boa_wintertc::microtask) so the public
  path boa_runtime::microtask::register is unchanged.
- MicrotaskExtension delegates to boa_wintertc::microtask::register.

The unit test is rewritten to record execution order in a global array
rather than through console, since console is not part of boa_wintertc's
test surface (it is still a stub pending its own migration).
Move setTimeout/clearTimeout/setInterval/clearInterval from
boa_runtime::interval into boa_wintertc::timers, following the
move-and-re-export pattern used for atob/btoa (boa-dev#5418). The module is renamed
interval -> timers to match its TC55 category.

- core/runtime/src/interval.rs and its tests are deleted; the code now lives
  only in boa_wintertc::timers.
- boa_runtime re-exports it under the historical name
  (pub use boa_wintertc::timers as interval) so the public path
  boa_runtime::interval (used by e.g. the WPT harness's clear_all) and the
  register(context) signature are unchanged.
- TimeoutExtension delegates to boa_wintertc::timers::register.
- boa_wintertc mirrors boa_runtime's test-only
  allow(clippy::needless_raw_string_hashes); runtime's now-unused
  inspect_context_async test helper gains allow(unused).
@KaustubhOG
KaustubhOG force-pushed the feat/wintertc-migrate-microtask branch from 8e9d3f9 to a0ee786 Compare July 20, 2026 16:25
@github-actions github-actions Bot added C-Dependencies Pull requests that update a dependency file C-Runtime Issues and PRs related to Boa's runtime features labels Jul 20, 2026
@KaustubhOG KaustubhOG changed the title feat(wintertc): migrate queueMicrotask from boa_runtime feat(wintertc): migrate structuredClone, queueMicrotask and timers from boa_runtime Jul 20, 2026
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.84211% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.65%. Comparing base (6ddc2b4) to head (1df7842).
⚠️ Report is 1001 commits behind head on main.

Files with missing lines Patch % Lines
core/wintertc/src/timers/mod.rs 97.46% 2 Missing ⚠️
core/wintertc/src/lib.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5419       +/-   ##
===========================================
+ Coverage   47.24%   62.65%   +15.41%     
===========================================
  Files         476      531       +55     
  Lines       46892    59079    +12187     
===========================================
+ Hits        22154    37018    +14864     
+ Misses      24738    22061     -2677     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KaustubhOG
KaustubhOG marked this pull request as ready for review July 20, 2026 17:06
@KaustubhOG
KaustubhOG requested a review from a team as a code owner July 20, 2026 17:06
@KaustubhOG

Copy link
Copy Markdown
Contributor Author

hey @jedel1043 Batched three trivial move + re-export migrations here (structuredClone,
queueMicrotask, timers).

Comment thread core/runtime/src/lib.rs Outdated
The base64, clone, microtask, timers, and store re-exports each carried a
near-identical doc comment repeating that the API is part of WinterTC (TC55)
and re-exported from boa_wintertc. Consolidate that shared explanation into a
single section on the crate root and let #[doc(inline)] surface each
component's own documentation, per review feedback.

@jedel1043 jedel1043 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great!

@jedel1043
jedel1043 added this pull request to the merge queue Jul 24, 2026
Merged via the queue into boa-dev:main with commit 947608c Jul 24, 2026
22 checks passed
@github-actions github-actions Bot removed the Waiting On Review Waiting on reviews from the maintainers label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Dependencies Pull requests that update a dependency file C-Runtime Issues and PRs related to Boa's runtime features C-Tests Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants