Skip to content

Commit

Permalink
Docs: mention that the worker script is inlined
Browse files Browse the repository at this point in the history
Since Emscripten 3.1.58, see commit:
emscripten-core/emscripten@37e1e68
  • Loading branch information
kleisauke committed Apr 27, 2024
1 parent 95310d5 commit d6cdcbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Uses libvips v8.15.2, compiled with Emscripten v3.1.58.

### Changed

- Inline worker script (`.worker.js`) into the main output file.
[emscripten-core/emscripten#21701](https://github.com/emscripten-core/emscripten/pull/21701)

## [v0.0.8] - 2024-03-17

Uses libvips v8.15.2, compiled with Emscripten v3.1.56.
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ yarn add wasm-vips

### Browser

Requires `vips.js`, `vips.wasm` and `vips.worker.js` to be served from
the same directory. Additionally, when using ES6 modules, it's necessary
to also serve the `vips-es6.js` and `vips-es6.worker.js` files.
Requires `vips.js` (or `vips-es6.js`) and `vips.wasm` to be served from
the same directory.

Since wasm-vips requires [the `SharedArrayBuffer` API](
https://caniuse.com/sharedarraybuffer), the website needs to opt-in to
a cross-origin isolated state, by serving the following HTTP headers on
both the main document and worker script (`*.worker.js`):
both the main document and `vips*.js` script:

```http
Cross-Origin-Embedder-Policy: require-corp
Expand Down

0 comments on commit d6cdcbb

Please sign in to comment.