Cloudflare Workers Support
Cloudflare Workers disallow loading WebAssembly modules from an ArrayBuffer
for security reasons.
They support conditional import from the workerd
field in package.json
, therefore xxhash-wasm
now includes an additional workerd
package that includes the WASM in a separate file. (#51)
You can install it with npm as usual and import it with:
import xxhash from "xxhash-wasm";
Performance
- Set state with
.subarray()
over.slice()
to avoid unnecessary copy that will be discarded right afterwards (#52)
What's Changed
- Bump json5 from 2.1.2 to 2.2.3 by @dependabot in #41
- Bump minimatch from 3.0.4 to 3.1.2 by @dependabot in #42
- Replace babel and terser with swc by @jungomi in #46
- feat: Add support for workerd by @arv in #51
- perf: set state with
.subarray()
over.slice()
to avoid copy by @jungomi in #52
New Contributors
Full Changelog: v1.0.2...v1.1.0