mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 03:25:46 -04:00
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.