Skip to content

Remove js-related bindings for non-js wasm builds#4528

Merged
jedel1043 merged 1 commit into
boa-dev:mainfrom
jedel1043:no-wasm-bindgen
Nov 9, 2025
Merged

Remove js-related bindings for non-js wasm builds#4528
jedel1043 merged 1 commit into
boa-dev:mainfrom
jedel1043:no-wasm-bindgen

Conversation

@jedel1043

@jedel1043 jedel1043 commented Nov 9, 2025

Copy link
Copy Markdown
Member

Fixes #4526.

This does not fix the issue for builds with the temporal feature enabled. We need to send a patch to iana-time-zone to avoid importing js-sys unconditionally, but use a feature instead; right now it is impossible to conditionally add js-sys for iana-time-zone.

@jedel1043 jedel1043 added this to the v1.0.0 milestone Nov 9, 2025
@jedel1043 jedel1043 requested a review from a team November 9, 2025 12:20
@jedel1043 jedel1043 added A-Bug Something isn't working C-WebAssembly Anything related to using Boa with Wasm labels Nov 9, 2025
@github-actions

github-actions Bot commented Nov 9, 2025

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 50,747 50,747 0
Passed 47,869 47,869 0
Ignored 2,060 2,060 0
Failed 818 818 0
Panics 0 0 0
Conformance 94.33% 94.33% 0.00%

@codecov

codecov Bot commented Nov 9, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.99%. Comparing base (6ddc2b4) to head (5e04ce1).
⚠️ Report is 590 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4528      +/-   ##
==========================================
+ Coverage   47.24%   56.99%   +9.75%     
==========================================
  Files         476      503      +27     
  Lines       46892    57451   +10559     
==========================================
+ Hits        22154    32746   +10592     
+ Misses      24738    24705      -33     

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

@Xyndra

Xyndra commented Nov 9, 2025

Copy link
Copy Markdown

It might be good to add a hint with getrandom_backend="unsupported" into the readme

@jedel1043

Copy link
Copy Markdown
Member Author

IMO we shouldn't recommend that backend; it disables all random functionality and some apps would want to implement a custom backend instead.

I thought the error message was clear enough, but we could also add a small FAQ to point to the getrandom docs if that error shows up.

@Xyndra

Xyndra commented Nov 9, 2025

Copy link
Copy Markdown

Yeah or maybe just write something saying that "wasm_js" backend is for JS, otherwise they can look at the getrandom docs

@Xyndra

Xyndra commented Nov 9, 2025

Copy link
Copy Markdown

I have tried the fork now and it seems to run (or, at least, not have any imports, because I found out my code can never run embedded since the core library uses DOM APIs)

@jedel1043 jedel1043 changed the title remove js-related bindings for non-js wasm builds Remove js-related bindings for non-js wasm builds Nov 9, 2025
@jedel1043 jedel1043 added this pull request to the merge queue Nov 9, 2025
Merged via the queue into boa-dev:main with commit f6601a0 Nov 9, 2025
18 checks passed
@jedel1043 jedel1043 deleted the no-wasm-bindgen branch November 9, 2025 22:27
jedel1043 added a commit that referenced this pull request Mar 29, 2026
Fixes #4526.

This does not fix the issue for builds with the `temporal` feature
enabled. We need to send a patch to `iana-time-zone` to avoid importing
`js-sys` unconditionally, but use a feature instead; right now it is
impossible to conditionally add `js-sys` for `iana-time-zone`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Bug Something isn't working C-WebAssembly Anything related to using Boa with Wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wasm32-unknown-unknown generates wasm-bindgen functions

3 participants