Skip to content

fix(webcrypto): expose global namespace constructors#3913

Merged
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/2576-webcrypto-globals
Jun 1, 2026
Merged

fix(webcrypto): expose global namespace constructors#3913
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/2576-webcrypto-globals

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Closes #2576

Summary

  • expose global WebCrypto constructors (Crypto, SubtleCrypto, CryptoKey) with Node-shaped illegal constructors, prototypes, descriptors, tags, and instanceof behavior
  • keep globalThis.crypto aligned with node:crypto.webcrypto and route crypto.subtle namespace reads/captured calls through WebCrypto dispatch
  • expand the focused WebCrypto parity fixture for descriptors, identity, rebound calls, random APIs, and CryptoKey construction shape

Verification

  • node --experimental-strip-types test-parity/node-suite/crypto/webcrypto/global-webcrypto-globals.ts
  • ./run_parity_tests.sh --suite node-suite --module crypto --filter global-webcrypto-globals
  • cargo check -p perry-runtime -p perry-hir -p perry-codegen -p perry-api-manifest -p perry-stdlib
  • cargo fmt --all -- --check
  • git diff --check
  • ./scripts/check_file_size.sh

andrewtdiz and others added 2 commits May 31, 2026 17:05
@proggeramlug proggeramlug merged commit c3cd065 into PerryTS:main Jun 1, 2026
11 checks passed
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.

globals: expose WebCrypto namespace and constructors

2 participants