-
Notifications
You must be signed in to change notification settings - Fork 24
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
Consider remove 'asm' feature or offer an option to disable it #16
Comments
Lines 52 to 57 in 22e74ea
These lines for Windows are completely removed, why would you think that MSVC build fail is related to the "asm" feature? |
Sorry, my bad. I ignored the unix constraint before the x86 arch. Lines 45 to 50 in 22e74ea
Despite this, I found a very strange problem during my test. Here it is (to reproduct the problem): Create a new crate, either bin or lib, doesn't matter. I'm gonna call it crypto-bin. Now the directory tree is like this:
Leaving alone the [package]
name = "crypto-bin"
version = "0.1.0"
edition = "2021"
[dependencies]
shadowsocks-crypto = "0.4" And I immediately ran
As you can see, But when I put this crate into a workspace, funny things happened.
and the outer [workspace]
members = [
"crypto-bin",
]
default-members = [
"crypto-bin",
] and then I ran
Now Unbelievable. Did I do something WRONG? Cuz I felt I did nothing. Sorry to bother you but I got little clue by Googling this. Hope you can help me understand. Thanks in advance! |
I think it would be related to cargo's feature resolver's bug. Use https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html |
Ok, thanks, but that's exact what I use in [package]
name = "crypto-bin"
version = "0.1.0"
edition = "2021"
[dependencies]
shadowsocks-crypto = "0.4" I made a patch to your lib which completely removed I still hold the opinion that If you don't agree, then maybe we should report this bug to cargo official? |
You could make a PR for this. |
Thanks, PR created. |
- shadowsocks/shadowsocks-crypto#16 - Removed md5-asm, sha1-asm dependencies
Ref RustCrypto/asm-hashes/issues#41
According to this benchmark, the all-intrinsics impl of the crypto has almost the same performance as the asm impl. (Or even slightly better?)
Ref RustCrypto/asm-hashes/issues#17
So the author said:
Considering that repo has no new commit since almost a year ago, I presume it is now in passive maintainance mode. The 'asm' feature is actually 'deprecated'. It exists because of backwards compatibility.
MSVC build is completely broken and this is very frustrating because it is the official prompt in rustup-init.exe. Installing GNU on windows is upsetting.
IMO, the 'asm' feature in deps can be removed. Or an option can be offered to this lib so users can choose.
The text was updated successfully, but these errors were encountered: