Skip to content

enable webassembly support#164

Closed
PaulLaux wants to merge 1 commit intozsa1from
enable-webassembly-support
Closed

enable webassembly support#164
PaulLaux wants to merge 1 commit intozsa1from
enable-webassembly-support

Conversation

@PaulLaux
Copy link
Collaborator

This PR enables WebAssembly support for the orchard crate by:

- Adding a target-specific override in Cargo.toml to pull in getrandom with its js feature on wasm32-unknown-unknown targets.
- Removing the multicore feature from the default feature set to avoid atomics-related compile errors on wasm32 targets, making multicore opt-in.
- Introducing a wasm feature flag for wasm-bindgen support and exposing the derive_orchard_address binding in lib.rs.
- Updating pkg/test-derive.js to resolve the wasm file path correctly in an ES module context using import.meta.url.
- Declaring bip39 as a runtime dependency in pkg/package.json so that npm install pulls in the mnemonic library.

Verification:
- cargo build --target wasm32-unknown-unknown completes successfully.
- node pkg/test-derive.js prints a valid spending key, full viewing key, and raw address.
@PaulLaux PaulLaux changed the base branch from main to zsa1 May 14, 2025 15:17
@PaulLaux PaulLaux closed this May 19, 2025
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.

1 participant