Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
### Cloudflare Workers Support

[Cloudflare Workers](https://developers.cloudflare.com/workers/) disallow loading WebAssembly modules from an
`ArrayBuffer` for security reasons.

They support [conditional import](https://developers.cloudflare.com/workers/wrangler/bundling/#conditional-exports) 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:

```javascript
import xxhash from "xxhash-wasm";
```

### Performance

- Set state with `.subarray()` over `.slice()` to avoid unnecessary copy that will be discarded right afterwards (#52)
  • Loading branch information
jungomi committed Nov 19, 2024
1 parent ca6c2d7 commit 5923f26
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ This changelog keeps all release notes in one place and mirrors the release
notes from the [GitHub releases][github-releases], except for older versions,
where no GitHub releases had been created.

## v1.1.0

### Cloudflare Workers Support

[Cloudflare Workers](https://developers.cloudflare.com/workers/) disallow loading WebAssembly modules from an
`ArrayBuffer` for security reasons.

They support [conditional import](https://developers.cloudflare.com/workers/wrangler/bundling/#conditional-exports) 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:

```javascript
import xxhash from "xxhash-wasm";
```

### Performance

- Set state with `.subarray()` over `.slice()` to avoid unnecessary copy that will be discarded right afterwards (#52)

## v1.0.2

- Add support for Typescript's `nodenext` module resolution (#33)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xxhash-wasm",
"version": "1.0.2",
"version": "1.1.0",
"description": "A WebAssembly implementation of xxHash",
"type": "module",
"main": "./cjs/xxhash-wasm.cjs",
Expand Down

0 comments on commit 5923f26

Please sign in to comment.