Make Earthstar select the best crypto driver for the detected platform
sgwilym opened this issue · 1 comments
sgwilym commented
Earthstar should automatically select the most performant crypto driver for the platform it's running on.
- Deno:
CryptoDriverSodium
- Browser:
CryptoDriverNoble
- Node:
CryptoDriverChloride
We'll probably need to have two versions of src/crypto/global-crypto-driver.ts
, one for Deno and one for the NPM distribution (we can't detect at runtime as the different drivers just being imported will cause either runtime to crash).
sgwilym commented
In the end this only applies to Deno, as Chloride was not a good default for the NPM browser distribution.