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

Disable ASM hashes on MSVC? #315

Closed
not-an-aardvark opened this issue Sep 9, 2021 · 4 comments
Closed

Disable ASM hashes on MSVC? #315

not-an-aardvark opened this issue Sep 9, 2021 · 4 comments

Comments

@not-an-aardvark
Copy link
Contributor

As documented in RustCrypto/asm-hashes#17 and elsewhere, the crates in asm-hashes don't work on Windows MSVC targets. This is unfortunate, but it's understandable given that assembly is inherently difficult to port to all platforms.

However, it seems unnecessary that this detail leaks into the crates in the hashes repository. Would it make sense to use conditional compilation to force the software versions of hashes on MSVC, even when the asm feature is enabled? (There is already precedent for ignoring the asm feature flag when no assembly builds are available for the current platform.)

My use case is that I want to enable the asm feature to allow for faster performance on compatible platforms, but I don't want to completely break the build for Windows users. I'd be happy to create a PR if you think this is a reasonable change.

not-an-aardvark added a commit to not-an-aardvark/lucky-commit that referenced this issue Sep 9, 2021
not-an-aardvark added a commit to not-an-aardvark/lucky-commit that referenced this issue Sep 9, 2021
not-an-aardvark added a commit to not-an-aardvark/lucky-commit that referenced this issue Sep 9, 2021
@newpavlov
Copy link
Member

Sounds reasonable. But I wonder whether we should use black- or white-list approach here (i.e. disable for MSVC or enable for GNU and other supported toolchains).

@newpavlov
Copy link
Member

Dependency on asm-hashes will be removed in v0.11 releases.

@tarcieri
Copy link
Member

@newpavlov should we close the remaining issues on https://github.com/RustCrypto/asm-hashes and archive it?

@newpavlov
Copy link
Member

Yes, but I think we should do it after v0.11 hashes are released.

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

No branches or pull requests

3 participants