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

Downgrade ahash for wasm build #35

Merged
merged 2 commits into from
Oct 29, 2020
Merged

Conversation

samsamai
Copy link
Contributor

When running ./build_web.sh, I ran into the following errors:

error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets
   --> /Users/sss/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/getrandom-0.2.0/src/lib.rs:224:9
    |
224 | /         compile_error!("target is not supported, for more information see: \
225 | |                         https://docs.rs/getrandom/#unsupported-targets");
    | |_________________________________________________________________________^

error[E0433]: failed to resolve: use of undeclared type or module `imp`
   --> /Users/sss/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/getrandom-0.2.0/src/lib.rs:246:5
    |
246 |     imp::getrandom_inner(dest)
    |     ^^^ use of undeclared type or module `imp`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0433`.
error: could not compile `getrandom`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Seems like getrandom doesn't see wasm32-unknown-unknown as a valid target.
Dropping ahash, which has the getrandom dependency, to version 0.4.6 fixes this for now.

egui/Cargo.toml Show resolved Hide resolved
@emilk
Copy link
Owner

emilk commented Oct 29, 2020

Thanks for noticing this!

Seems to me like two other things should also happen:

  • Open an issue for ahash
  • Run the web build on the CI so this doesn't happen again

I have also been thinking about making ahash an optional dependency (I only use it for a speed boost anyway).... just me thinking out loud :)

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Please add a comment to Cargo.toml about why we aren't using the latest ahash version (maybe link to this PR)

@emilk emilk merged commit a79aaa7 into emilk:master Oct 29, 2020
@samsamai samsamai deleted the ahash_downgrade branch October 30, 2020 03:36
@emilk
Copy link
Owner

emilk commented Nov 6, 2020

Issue filed to tkaitchuck/aHash#59

@emilk
Copy link
Owner

emilk commented Nov 6, 2020

Upgraded to ahash 0.5 in 8393d1d

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