Skip to content

wasm32 support#718

Open
arvidn wants to merge 4 commits into
mainfrom
wasm32
Open

wasm32 support#718
arvidn wants to merge 4 commits into
mainfrom
wasm32

Conversation

@arvidn

@arvidn arvidn commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Rayon doesn't support wasm32, which is used by criterion. So benchmarks are disabled for wasm32.


Note

Medium Risk
Mostly build/test and target-specific dependency changes, but it also changes atom-size acceptance and parsing behavior in serde/parse_atom.rs, which could affect compatibility for extremely large serialized inputs.

Overview
Adds wasm32-unknown-unknown support across the crate and CI.

CI now runs a dedicated wasm_tests job that installs wasm-bindgen-test-runner and executes cargo test for the clvmr crate on the WASM target; rust-toolchain.toml also includes the WASM target.

To make tests portable, a wasm_compat::test shim is introduced and applied broadly so unit/rstest tests can run under wasm-bindgen-test; WASM builds also avoid criterion (Rayon) by making it a non-wasm dev-dependency, add WASM-specific getrandom configuration, and embed op-test fixtures via include_str! for WASM. Serialization parsing is tightened for WASM by bounding atom sizes to fit in usize (32-bit) and using fallible usize conversions when slicing/advancing cursors.

Written by Cursor Bugbot for commit 94c2221. This will update automatically on new commits. Configure here.

@socket-security

socket-security Bot commented Mar 1, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​wasm-bindgen-test@​0.3.5010010093100100

View full report

@socket-security

socket-security Bot commented Mar 1, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • cargo/minicov@0.3.8

View full report

Comment thread src/serde/parse_atom.rs
Comment thread src/serde/parse_atom.rs
Comment thread src/more_ops.rs Outdated
@arvidn

arvidn commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore cargo/minicov@0.3.8

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread src/serde/parse_atom.rs
@coveralls-official

coveralls-official Bot commented Mar 4, 2026

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 22691930026

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.001%) to 88.262%

Files with Coverage Reduction New Missed Lines %
src/serde/parse_atom.rs 1 99.14%
Totals Coverage Status
Change from base Build 22681542686: 0.001%
Covered Lines: 6978
Relevant Lines: 7906

💛 - Coveralls

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant