Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove faulty support for wasm64-unknown-unknown #551

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

daxpedda
Copy link
Contributor

This removes the previously in #303 added support for wasm64-unknown-unknown.

wasm-bindgen does in fact not support the Memory64 proposal. The reason it still compiled is that wasm-bindgen emits panicking stubs for any target it doesn't support. However, during runtime this would have failed.

| `rdrand` | x86, x86-64 | `x86_64-*`, `i686-*` | [`RDRAND`] instruction
| `rndr` | AArch64 | `aarch64-*` | [`RNDR`] register
| `esp_idf` | ESP-IDF | `*‑espidf` | [`esp_fill_random`]. WARNING: can return low-quality entropy without proper hardware configuration!
| `wasm_js` | Web Browser, Node.js | `wasm32‑unknown‑unknown` | [`Crypto.getRandomValues`] if available, then [`crypto.randomFillSync`] if on Node.js (see [WebAssembly support])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wasm-bindgen only supports wasm32-unknown-unknown (and now wasm32v1-none, see #541), it does not support Emscripten. Even though Emscriptens target is wasm32-unknown-emscripten, I'm not what else was being implied here.

Copy link
Member

Choose a reason for hiding this comment

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

wasm_js works only on target_os = "unknown" targets, so IIUC it can not be used with Emscripten.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. I was referring to the fact that it previously said wasm*-*-unknown, implying the target_os could be something else.

@newpavlov newpavlov merged commit 69b3536 into rust-random:master Nov 29, 2024
56 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.

2 participants