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

Support wasm target #7

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Support wasm target #7

merged 1 commit into from
Oct 14, 2022

Conversation

kazk
Copy link
Owner

@kazk kazk commented Oct 3, 2022

Resolves #6

@kazk kazk mentioned this pull request Oct 3, 2022
@kazk
Copy link
Owner Author

kazk commented Oct 13, 2022

To use with wasm-pack, getrandom's js feature must be enabled. The feature makes getrandom assume that you are building for an environment containing JavaScript.

# `getrandom` is a dependency of `rand` which is in turn a dependency of `xid`.
# Enable `js` feature to support `wasm32-unknown-unknown` target used by `wasm-pack`.
# Makes `getrandom` assume that you are building for an environment containing JavaScript.
# See https://docs.rs/getrandom/latest/getrandom/#webassembly-support
getrandom = { version = "0.2.7", features = ["js"] }

@kazk kazk marked this pull request as ready for review October 14, 2022 07:37
@kazk kazk merged commit 6101e05 into main Oct 14, 2022
@kazk kazk deleted the target-wasm branch October 14, 2022 07:37
kazk added a commit that referenced this pull request Oct 14, 2022
* Fix clippy by #8
* Support wasm target by #7
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.

Can't target Wasm web
1 participant