bryant / argon2rs

The pure-Rust password hashing library running on Argon2.
MIT License
174 stars 19 forks source link

Allow usage without threadpool #20

Closed jackpot51 closed 7 years ago

jackpot51 commented 7 years ago

This allows usage of argon2 on targets without a full libstd.

jackpot51 commented 7 years ago

Sure, I can clean it up a lot - just checking if this is desired.

bryant commented 7 years ago

go ahead and rebase onto #21.

bryant commented 7 years ago

Just out of curiosity: Are you using this in Redox? What kind of parallelism primitives are there instead?

jackpot51 commented 7 years ago

All parallel features in libstd are available. num_cpus has not been ported, which is why the threadpool crate does not compile on Redox

bryant commented 7 years ago

do you mean the num_cpus crate? scoped_threadpool doesn't depend on that.

jackpot51 commented 7 years ago

In that case, I will retry building with scoped_threadpool

jackpot51 commented 7 years ago

It looks like the build using scoped_threadpool works fine now.

bryant commented 7 years ago

FYI, this feature was added anyway in https://github.com/bryant/argon2rs/commit/b306695bd786a67958fba44b35e7d98139e3e437 . To build without the scoped_threadpool dependency, invoke cargo build --no-default-features (the default setting will use threads whenever lanes > 1).