You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 5, 2020. It is now read-only.
Checksum calculations were failing in Edge because the Rust WebAssembly
wrapper depends on `TextDecoder`, which is not supported by the
current version of Edge (even though WebAssembly itself is supported):
https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoder
This commit fixes the problem by trying to load the WASM module, and
falling back to checksums calculated in JavaScript if the module fails to
load.
This uses exceptions for control flow, but there's no obvious property to
test to be confident that WASM will work, since it may depend on modules
other than `TextDecoder` in the future.
A possible alternative would be to polyfill `TextDecoder`, as described
here: golang/go#27295 (comment)
The polyfill is quite complicated, though, so the JS checksum fallback
seems like a better solution, at least for now. We can revisit it if there
are major performance problems.
0 commit comments