feat(wintertc): migrate atob/btoa from boa_runtime#5418
Open
KaustubhOG wants to merge 1 commit into
Open
Conversation
Move the base64 module (atob and btoa) into the boa_wintertc crate as the first step of migrating the existing Web APIs into the dedicated TC55 crate. The implementation is moved unchanged; the only difference from the boa_runtime version is a short TC55 status note added to the module documentation. boa_runtime keeps its own base64 module for now, so there is no behaviour change for existing users. The test harness (TestAction and run_test_actions_with) is ported into boa_wintertc so the migrated unit tests run unchanged. All six base64 unit tests pass.
Test262 conformance changes
Tested main commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5418 +/- ##
===========================================
+ Coverage 47.24% 60.32% +13.07%
===========================================
Files 476 567 +91
Lines 46892 63163 +16271
===========================================
+ Hits 22154 38102 +15948
- Misses 24738 25061 +323 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request is part of the TC55 migration tracked in #4988, and builds on the skeleton crate from #5105.
It moves the
base64module (atobandbtoa) fromboa_runtimeinto the dedicatedboa_wintertccrate as the first migration step toward hosting the WinterTC TC55 Minimum Common Web API in its own crate.It changes the following:
base64module (mod.rsandtests.rs) intoboa_wintertc. The implementation is unchanged; the only difference from theboa_runtimeversion is a short TC55 status note added to the module documentation.TestActionandrun_test_actions_with) intoboa_wintertcso the migrated unit tests run unchanged. This harness will be reused by later migrations.core/wintertc/Cargo.toml: thebase64dependency, plusindoc,textwrap, andfutures-liteas dev dependencies.Line counts (before and after, in both locations):
boa_runtime(source)boa_wintertcbeforeboa_wintertcafterbase64/mod.rsbase64/tests.rsThe 4 extra lines in
mod.rsare the TC55 status doc note; the code itself is identical.tests.rsis byte for byte the same.Approach:
boa_runtimekeeps its ownbase64module for now, so there is no behaviour change for existing users and no new cross-crate dependency is introduced in this PR. Wiringboa_runtimeto re-export fromboa_wintertc(and removing the duplicate) is intended as a follow up, once the dependency direction between the two crates is agreed.Testing:
cargo test -p boa_wintertc: all six base64 unit tests pass, plus the crate doctest.cargo clippy -p boa_wintertc --all-features --all-targets: clean, no warnings.cargo fmt -p boa_wintertc -- --check: clean.cargo test -p boa_runtime base64: still passes (source untouched).Out of scope:
boa_runtime, so it does not yet exercise theboa_wintertccopy. That is covered automatically once the re-export follow up lands.atobandbtoaare Web APIs rather than ECMAScript.