earthstar-project / earthstar

Storage for private, distributed, offline-first applications.
https://earthstar-project.org
GNU Lesser General Public License v3.0
624 stars 18 forks source link

Make Earthstar select the best crypto driver for the detected platform #268

Closed sgwilym closed 1 year ago

sgwilym commented 1 year ago

Earthstar should automatically select the most performant crypto driver for the platform it's running on.

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 1 year ago

In the end this only applies to Deno, as Chloride was not a good default for the NPM browser distribution.