Add infrastructure to build and publish as wasm32 (#3840)

Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
This commit is contained in:
Lovell Fuller
2023-11-09 14:46:07 +00:00
committed by GitHub
parent 475bf16b09
commit a8f68ba7f0
17 changed files with 241 additions and 20 deletions

View File

@@ -14,6 +14,9 @@ Requires libvips v8.15.0
* Remove `sharp.vendor`.
* Add experimental support for WebAssembly-based runtimes.
[@RReverser](https://github.com/RReverser)
* Options for `trim` operation must be an Object, add new `lineArt` option.
[#2363](https://github.com/lovell/sharp/issues/2363)

View File

@@ -278,3 +278,6 @@ GitHub: https://github.com/bianjunjie1981
Name: Dennis Beatty
GitHub: https://github.com/dnsbty
Name: Ingvar Stepanyan
GitHub: https://github.com/RReverser

View File

@@ -78,6 +78,15 @@ For cross-compiling, the `--platform`, `--arch` and `--libc` npm flags
(or the `npm_config_platform`, `npm_config_arch` and `npm_config_libc` environment variables)
can be used to configure the target environment.
## WebAssembly
Experimental support is provided for runtime environments that provide
multi-threaded Wasm via Workers.
```sh
npm install --cpu=wasm32 sharp
```
## FreeBSD
The `vips` package must be installed before `npm install` is run.

File diff suppressed because one or more lines are too long