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

Fix wasm build #137

Merged
merged 3 commits into from
Mar 18, 2024
Merged

Fix wasm build #137

merged 3 commits into from
Mar 18, 2024

Conversation

davidpdrsn
Copy link
Contributor

Checklist

  • I have read the Contributor Guide
  • I have read and agree to the Code of Conduct
  • I have added a description of my changes and why I'd like them included in the section below

Description of Changes

Noticed that 0.2 didn't build on wasm:

❯ cargo build --target wasm32-unknown-unknown --no-default-features
   Compiling getrandom v0.2.12
   Compiling indexmap v1.9.3
error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
   --> /Users/david.pedersen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.12/src/lib.rs:291:9
    |
291 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
292 | |                         default, you may need to enable the \"js\" feature. \
293 | |                         For more information see: \
294 | |                         https://docs.rs/getrandom/#webassembly-support");
    | |________________________________________________________________________^

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
   --> /Users/david.pedersen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.12/src/lib.rs:347:9
    |
347 |         imp::getrandom_inner(dest)?;
    |         ^^^ use of undeclared crate or module `imp`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `getrandom` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@davidpdrsn davidpdrsn changed the base branch from main to v0.2.0 March 8, 2024 22:39
@davidpdrsn davidpdrsn changed the title V0.2.0 fix wasm build Fix wasm build Mar 8, 2024
@davidpdrsn davidpdrsn marked this pull request as ready for review March 8, 2024 22:42
@davidpdrsn davidpdrsn requested a review from fu5ha March 8, 2024 22:42
@davidpdrsn davidpdrsn added this to the 0.2.0 milestone Mar 11, 2024
@davidpdrsn davidpdrsn merged commit bfd7eee into v0.2.0 Mar 18, 2024
5 checks passed
@davidpdrsn davidpdrsn deleted the v0.2.0--fix-wasm-build branch March 18, 2024 08:46
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