Commit Graph

9 Commits

Author SHA1 Message Date
Richard van der Hoff
e45c57d8fe feat(crypto-js): allow async load of webassembly (#1198)
It turns out that Google Chrome refuses to initialise the wasm via the
synchronous `WebAssembly.Module` constructor, complaining that it is too
big. To be fair, it has a point.

Anyway, that means we need to provide a way to load the wasm
asynchronously. So, we introduce an `initAsync()` function which applications
can call before they do anything else, to load the wasm in the background.

If the app *doesn't* call `initAsync()`, then we load the wasm synchronously
the first time a function that accesses the wasm is called.
2022-11-10 11:51:37 +00:00
Richard van der Hoff
898265b257 Clean up build script 2022-11-02 17:22:00 +00:00
Richard van der Hoff
9d400a7494 fix JS syntax 2022-11-02 17:13:58 +00:00
Ivan Enderlin
a4ca6dbf38 !debug 2022-11-02 17:25:13 +01:00
Ivan Enderlin
bb96ab89f8 fix(crypto-js): Make build.sh cross-platform-ish. 2022-11-02 16:57:26 +01:00
Ivan Enderlin
28d4a69552 !fixup 2022-11-02 16:32:20 +01:00
Ivan Enderlin
6497d6d676 feat(crypto-js): Make scripts/build.sh compatible with macOS.
This patch also improves the “phrasing”, simplifies the code a little bit etc.
Small stuff.
2022-11-02 16:19:17 +01:00
Richard van der Hoff
ce03f016b9 Copy unbase64.js into the right place 2022-11-01 10:19:13 +00:00
Richard van der Hoff
093856671a Encode the WASM as base64
Some nasty hackery to get around the nastiness of the JS ecosystem
2022-10-31 22:39:44 +00:00