Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMD support is musted? #33

Open
hurryhuang1007 opened this issue Dec 6, 2022 · 3 comments
Open

SIMD support is musted? #33

hurryhuang1007 opened this issue Dec 6, 2022 · 3 comments
Labels
question Further information is requested

Comments

@hurryhuang1007
Copy link

This repo is awesome!
At this stage it looks like simd support is necessary, is it possible to build no simd version for lower version browsers (those that don't support simd)?

@kleisauke kleisauke added the question Further information is requested label Dec 6, 2022
@kleisauke
Copy link
Owner

kleisauke commented Dec 6, 2022

Hello, the pre-built binaries currently requires an engine that supports Wasm SIMD. However, you can still build binaries without this feature, by passing the --disable-simd build parameter.

Assuming you have Docker installed (or another OCI-compliant container runtime, such as Podman) and using a Unix-like environment (otherwise $(pwd) does not work), you can use the build command available in package.json.

"build": "docker build -t wasm-vips . && docker run -it --rm -v $(pwd):/src wasm-vips ./build.sh",

For example:

$ npm run build -- --disable-simd

There's a possibility that I can provide pre-built binaries that does not use SIMD as a fallback (e.g., for compatibility with Safari, which at the time of writing does not support that). However, I don't know if that makes sense, given that Wasm SIMD is standardized, and is likely to become a mandatory feature in Wasm 2.0.

FWIW, I'm also planning to make use of the standardized reference types feature, which is enabled by default on V8-based engines after commit v8/v8@c96864e (corresponds to V8 9.6, Chrome 96, Node.js 17.2.0 and Deno 1.16.0). It's a bit too early to enable that and should happen after Node 16.x reaches EOL. Fortunately, this feature is supported by Safari and should already be safe to enable on Firefox (supported since version 79, so that doesn't require increasing the minimum version).

@hurryhuang1007
Copy link
Author

Thx for your reply.
I will try to build the no simd version according to the method you said.

In my region, for some reason, chrome is not popular, replaced by various custom browsers based on chromium.
And these browsers don't seem to care about updating the chromium version, so we have a large number of users using outdated browsers (nearly 80% of people use the chrome86 kernel version of the browser).
That's why I need the no simd version.

@atjn
Copy link
Contributor

atjn commented Dec 29, 2022

FYI it seems likely that Safari will support SIMD in version 16.3 sometime in February/March. At that stage, all engines support the feature 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants